summaryrefslogtreecommitdiffstats
path: root/libc/misc/elf/dl-support.c
diff options
context:
space:
mode:
authorAustin Foxley <austinf@cetoncorp.com>2009-09-23 09:55:03 -0700
committerAustin Foxley <austinf@cetoncorp.com>2009-09-23 09:56:04 -0700
commitd74b8a68d450072ee3c6e6b586d32ff38e88f840 (patch)
tree02981405617f4cf3e9366a8e8e88aae452cab797 /libc/misc/elf/dl-support.c
parent46348ce60a0005d8009349f09f80ca35669801b9 (diff)
downloaduClibc-alpine-d74b8a68d450072ee3c6e6b586d32ff38e88f840.tar.bz2
uClibc-alpine-d74b8a68d450072ee3c6e6b586d32ff38e88f840.tar.xz
tls: test for DTV vs TCB at TP correctly
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'libc/misc/elf/dl-support.c')
-rw-r--r--libc/misc/elf/dl-support.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/libc/misc/elf/dl-support.c b/libc/misc/elf/dl-support.c
index 002262a3a..3f5248128 100644
--- a/libc/misc/elf/dl-support.c
+++ b/libc/misc/elf/dl-support.c
@@ -47,9 +47,9 @@ void
internal_function
_dl_nothread_init_static_tls (struct link_map *map)
{
-# if TLS_TCB_AT_TP
+# if defined(TLS_TCB_AT_TP)
void *dest = (char *) THREAD_SELF - map->l_tls_offset;
-# elif TLS_DTV_AT_TP
+# elif defined(TLS_DTV_AT_TP)
void *dest = (char *) THREAD_SELF + map->l_tls_offset + TLS_PRE_TCB_SIZE;
# else
# error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP must be defined"