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 2024-04-27 23:09:43 -04:00 committed by Andrew Kaster
parent 5963b785e7
commit d510d2aeb2
Notes: sideshowbarker 2024-07-17 06:40:21 +09:00
3 changed files with 0 additions and 13 deletions

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)
{

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;

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