summaryrefslogtreecommitdiff
path: root/libc/misc/elf
diff options
context:
space:
mode:
authorHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>2009-12-16 13:12:00 +0100
committerHans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>2009-12-17 13:45:51 +0100
commitf3217f9be3225c4943677d03b274cbc0cb4ed228 (patch)
treecd994714586789ad2d039b62e5411406176e0396 /libc/misc/elf
parent02a89fe640faeb77920643190bff29894e503d64 (diff)
check if USE_TLS is defined before use
This patch will convert all the #ifdef USE_TLS and #if USE_TLS to #if defined(USE_TLS) && USE_TLS. By checking if the USE_TLS is defined before checking its value will result in correct behavior for architectures not defining this config symbol. Signed-off-by: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com> Acked-by: Carmelo AMOROSO <carmelo.amoroso@st.com>
Diffstat (limited to 'libc/misc/elf')
-rw-r--r--libc/misc/elf/dl-support.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libc/misc/elf/dl-support.c b/libc/misc/elf/dl-support.c
index 3f5248128..665b62a24 100644
--- a/libc/misc/elf/dl-support.c
+++ b/libc/misc/elf/dl-support.c
@@ -13,14 +13,14 @@
#include <link.h>
#include <elf.h>
-#if USE_TLS
+#if defined(USE_TLS) && USE_TLS
#include <assert.h>
#include <tls.h>
#include <ldsodefs.h>
#include <string.h>
#endif
-#if USE_TLS
+#if defined(USE_TLS) && USE_TLS
void (*_dl_init_static_tls) (struct link_map *) = &_dl_nothread_init_static_tls;
@@ -39,7 +39,7 @@ void internal_function _dl_aux_init (ElfW(auxv_t) *av)
_dl_phnum = (size_t) av[AT_PHNUM].a_un.a_val;
}
-#if USE_TLS
+#if defined(USE_TLS) && USE_TLS
/* Initialize static TLS area and DTV for current (only) thread.
libpthread implementations should provide their own hook
to handle all threads. */