|
@@ -38,7 +38,7 @@
|
|
|
|
|
|
#define ALLOW_ZERO_PLTGOT
|
|
|
|
|
|
-#if USE_TLS
|
|
|
+#if defined(USE_TLS) && USE_TLS
|
|
|
#include "dl-tls.c"
|
|
|
#endif
|
|
|
|
|
@@ -225,7 +225,7 @@ void _dl_free(void *p)
|
|
|
(*_dl_free_function) (p);
|
|
|
}
|
|
|
|
|
|
-#if USE_TLS
|
|
|
+#if defined(USE_TLS) && USE_TLS
|
|
|
void *_dl_memalign(size_t __boundary, size_t __size)
|
|
|
{
|
|
|
void *result;
|
|
@@ -294,7 +294,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr,
|
|
|
ElfW(Addr) relro_addr = 0;
|
|
|
size_t relro_size = 0;
|
|
|
struct stat st;
|
|
|
-#if USE_TLS
|
|
|
+#if defined(USE_TLS) && USE_TLS
|
|
|
void *tcbp = NULL;
|
|
|
#endif
|
|
|
|
|
@@ -371,7 +371,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr,
|
|
|
unlazy = RTLD_NOW;
|
|
|
}
|
|
|
|
|
|
-#if USE_TLS
|
|
|
+#if defined(USE_TLS) && USE_TLS
|
|
|
_dl_error_catch_tsd = &_dl_initial_error_catch_tsd;
|
|
|
_dl_init_static_tls = &_dl_nothread_init_static_tls;
|
|
|
#endif
|
|
@@ -491,7 +491,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr,
|
|
|
|
|
|
|
|
|
if (ppnt->p_type == PT_TLS) {
|
|
|
-#if USE_TLS
|
|
|
+#if defined(USE_TLS) && USE_TLS
|
|
|
if (ppnt->p_memsz > 0) {
|
|
|
app_tpnt->l_tls_blocksize = ppnt->p_memsz;
|
|
|
app_tpnt->l_tls_align = ppnt->p_align;
|
|
@@ -518,7 +518,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr,
|
|
|
app_tpnt->relro_addr = relro_addr;
|
|
|
app_tpnt->relro_size = relro_size;
|
|
|
|
|
|
-#if USE_TLS
|
|
|
+#if defined(USE_TLS) && USE_TLS
|
|
|
|
|
|
* Adjust the address of the TLS initialization image in
|
|
|
* case the executable is actually an ET_DYN object.
|
|
@@ -918,7 +918,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr,
|
|
|
}
|
|
|
#endif
|
|
|
|
|
|
-#if USE_TLS
|
|
|
+#if defined(USE_TLS) && USE_TLS
|
|
|
|
|
|
* initial modules uses TLS. This makes dynamic loading of modules with
|
|
|
* TLS impossible, but to support it requires either eagerly doing setup
|
|
@@ -971,7 +971,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr,
|
|
|
_dl_protect_relro (tpnt);
|
|
|
}
|
|
|
|
|
|
-#if USE_TLS
|
|
|
+#if defined(USE_TLS) && USE_TLS
|
|
|
if (!was_tls_init_tp_called && _dl_tls_max_dtv_idx > 0)
|
|
|
++_dl_tls_generation;
|
|
|
|
|
@@ -1058,7 +1058,7 @@ void _dl_get_ready_to_run(struct elf_resolve *tpnt, DL_LOADADDR_TYPE load_addr,
|
|
|
_dl_malloc_function = (void* (*)(size_t)) (intptr_t) _dl_find_hash(__C_SYMBOL_PREFIX__ "malloc",
|
|
|
_dl_symbol_tables, NULL, ELF_RTYPE_CLASS_PLT, NULL);
|
|
|
|
|
|
-#if USE_TLS
|
|
|
+#if defined(USE_TLS) && USE_TLS
|
|
|
|
|
|
_dl_calloc_function = (void* (*)(size_t, size_t)) (intptr_t)
|
|
|
_dl_find_hash(__C_SYMBOL_PREFIX__ "calloc", _dl_symbol_tables, NULL, ELF_RTYPE_CLASS_PLT, NULL);
|