From b123d06e21fbd622806df67951942605d879971e Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 10 Feb 2002 07:44:36 +0000 Subject: 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. --- sysdeps/generic/dl-tls.c | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'sysdeps/generic') 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 -- cgit 1.4.1