summaryrefslogtreecommitdiffstats
path: root/ldso/ldso/dl-startup.c
diff options
context:
space:
mode:
authorAustin Foxley <austinf@cetoncorp.com>2009-09-19 10:04:05 -0700
committerAustin Foxley <austinf@cetoncorp.com>2009-09-26 09:37:18 -0700
commit534661b91c98492995274c364c8177c45efc63db (patch)
tree333c655a3159fdb72a693a7335ba347094dfd57a /ldso/ldso/dl-startup.c
parentd21497f9fba95688e464ae712bd6b4c0fbc4ea13 (diff)
downloaduClibc-alpine-534661b91c98492995274c364c8177c45efc63db.tar.bz2
uClibc-alpine-534661b91c98492995274c364c8177c45efc63db.tar.xz
ldso/: tls support for dynamic linker
Signed-off-by: Austin Foxley <austinf@cetoncorp.com>
Diffstat (limited to 'ldso/ldso/dl-startup.c')
-rw-r--r--ldso/ldso/dl-startup.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/ldso/ldso/dl-startup.c b/ldso/ldso/dl-startup.c
index de9c8bc4e..6f07b960a 100644
--- a/ldso/ldso/dl-startup.c
+++ b/ldso/ldso/dl-startup.c
@@ -209,6 +209,20 @@ DL_START(unsigned long args)
_dl_parse_dynamic_info(dpnt, tpnt->dynamic_info, NULL, load_addr);
#endif
+ /*
+ * BIG ASSUMPTION: We assume that the dynamic loader does not
+ * have any TLS data itself. If this ever occurs
+ * more work than what is done below for the
+ * loader will have to happen.
+ */
+#if USE_TLS
+ /* This was done by _dl_memset above. */
+ /* tpnt->l_tls_modid = 0; */
+# if NO_TLS_OFFSET != 0
+ tpnt->l_tls_offset = NO_TLS_OFFSET;
+# endif
+#endif
+
SEND_EARLY_STDERR_DEBUG("Done scanning DYNAMIC section\n");
#if defined(PERFORM_BOOTSTRAP_GOT)