LibC: Remove now redundant NO_TLS guards

Since DynamicLoader is compiled with -fdata-sections and --gc-sections,
unused thread_local variables won't create TLS section in it anymore.
This commit is contained in:
Dan Klishch authored and Andrew Kaster committed 2024-05-07 16:39:17 -06:00
1 parent 5963b785e7
commit d510d2aeb2
3 files changed
-13

No files matched your search

-5
View File
@@ -17,13 +17,8 @@
[[gnu::weak]] Result<void, DlErrorMessage> __dladdr(void const*, Dl_info*) asm("__dladdr");
// FIXME: use thread_local and a String once TLS works
#ifdef NO_TLS
char* s_dlerror_text = NULL;
bool s_dlerror_retrieved = false;
#else
__thread char* s_dlerror_text = NULL;
__thread bool s_dlerror_retrieved = false;
#endif
static void store_error(ByteString const& error)
{
-4
View File
@@ -19,11 +19,7 @@
extern "C" {
#ifdef NO_TLS
int h_errno;
#else
__thread int h_errno;
#endif
static hostent __gethostbyname_buffer;
static in_addr_t __gethostbyname_address;
-4
View File
@@ -55,11 +55,7 @@ struct protoent* getprotobynumber(int proto);
struct protoent* getprotoent(void);
void setprotoent(int stay_open);
#ifdef NO_TLS
extern int h_errno;
#else
extern __thread int h_errno;
#endif
#define HOST_NOT_FOUND 101
#define NO_DATA 102