about summary refs log tree commit diff
path: root/sysdeps/generic/dl-tls.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-02-10 07:44:36 +0000
committerUlrich Drepper <drepper@redhat.com>2002-02-10 07:44:36 +0000
commitb123d06e21fbd622806df67951942605d879971e (patch)
tree2793b19baca280270087a29f9e3ebf97ec609c3d /sysdeps/generic/dl-tls.c
parent3065b0c799c01456e8b7095b51bc5b50ffab251f (diff)
downloadglibc-b123d06e21fbd622806df67951942605d879971e.tar.gz
glibc-b123d06e21fbd622806df67951942605d879971e.tar.xz
glibc-b123d06e21fbd622806df67951942605d879971e.zip
Update.
	* elf/Makefile (tests): Add tst-tls1.
	* elf/tst-tls1.c: New file.

	* sysdeps/generic/dl-tls.c (_dl_determine_tlsoffset): Don't handle
	alignment of TCB for now.

	* elf/rtld.c (dl_main): Use p_vaddr as address of TLS
	initialization image for the application itself.

	loop to initialize TLS block.
Diffstat (limited to 'sysdeps/generic/dl-tls.c')
-rw-r--r--sysdeps/generic/dl-tls.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/sysdeps/generic/dl-tls.c b/sysdeps/generic/dl-tls.c
index 5c05baee0c..2c5fa75b62 100644
--- a/sysdeps/generic/dl-tls.c
+++ b/sysdeps/generic/dl-tls.c
@@ -112,21 +112,17 @@ _dl_determine_tlsoffset (struct link_map *firstp)
     }
   while ((runp = runp->l_tls_nextimage) != firstp);
 
+#if 0
   /* The thread descriptor (pointed to by the thread pointer) has its
      own alignment requirement.  Adjust the static TLS size
      and TLS offsets appropriately.  */
+  // XXX How to deal with this.  We cannot simply add zero bytes
+  // XXX after the first (closest to the TCB) TLS block since this
+  // XXX would invalidate the offsets the linker creates for the LE
+  // XXX model.
   if (offset % TLS_TCB_ALIGN != 0)
-    {
-      size_t add = TLS_TCB_ALIGN - offset % TLS_TCB_ALIGN;
-
-      /* XXX If the offset stored is negative we must subtract here.  */
-      offset += add;
-
-      runp = firstp;
-      do
-	runp->l_tls_offset += add;
-      while ((runp = runp->l_tls_nextimage) != firstp);
-    }
+    abort ();
+#endif
 
   GL(dl_tls_static_size) = offset + TLS_TCB_SIZE;
 # elif TLS_DTV_AT_TP