diff options
author | Jakub Jelinek <jakub@redhat.com> | 2005-03-24 08:19:18 +0000 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2005-03-24 08:19:18 +0000 |
commit | 55a24b753a4f6e03ed23e16b2be847bd5c5642a7 (patch) | |
tree | c72d70578f8305f1cfedc9a24507d12c45a5ff1c /elf | |
parent | dfaef65dcfc165ef88957b7b4633499cbf612299 (diff) | |
download | glibc-55a24b753a4f6e03ed23e16b2be847bd5c5642a7.tar.gz glibc-55a24b753a4f6e03ed23e16b2be847bd5c5642a7.tar.xz glibc-55a24b753a4f6e03ed23e16b2be847bd5c5642a7.zip |
Updated to fedora-glibc-20050324T0715 cvs/fedora-glibc-2_3_4-17
Diffstat (limited to 'elf')
-rw-r--r-- | elf/Makefile | 11 | ||||
-rw-r--r-- | elf/dl-open.c | 2 | ||||
-rw-r--r-- | elf/elf.h | 4 | ||||
-rw-r--r-- | elf/rtld.c | 3 | ||||
-rw-r--r-- | elf/tst-tls15.c | 32 | ||||
-rw-r--r-- | elf/tst-tlsmod15a.c | 6 | ||||
-rw-r--r-- | elf/tst-tlsmod15b.c | 17 |
7 files changed, 70 insertions, 5 deletions
diff --git a/elf/Makefile b/elf/Makefile index 80a3f6cb19..c034b2ba6e 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -159,7 +159,7 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \ neededtest3 neededtest4 unload2 lateglobal initfirst global \ restest2 next dblload dblunload reldep5 reldep6 reldep7 reldep8 \ circleload1 tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7 tst-tls8 \ - tst-tls10 tst-tls11 tst-tls12 tst-tls13 tst-tls14 tst-align \ + tst-tls10 tst-tls11 tst-tls12 tst-tls13 tst-tls14 tst-tls15 tst-align \ tst-align2 $(tests-execstack-$(have-z-execstack)) tst-dlmodcount \ tst-dlopenrpath tst-deep1 tst-dlmopen1 tst-dlmopen2 tst-dlmopen3 \ unload3 unload4 unload5 tst-audit1 tst-global1 order2 @@ -190,6 +190,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \ tst-tlsmod5 tst-tlsmod6 tst-tlsmod7 tst-tlsmod8 \ tst-tlsmod9 tst-tlsmod10 tst-tlsmod11 tst-tlsmod12 \ tst-tlsmod13 tst-tlsmod13a tst-tlsmod14a tst-tlsmod14b \ + tst-tlsmod15a tst-tlsmod15b \ circlemod1 circlemod1a circlemod2 circlemod2a \ circlemod3 circlemod3a \ reldep8mod1 reldep8mod2 reldep8mod3 \ @@ -471,6 +472,7 @@ tst-tlsmod10.so-no-z-defs = yes tst-tlsmod12.so-no-z-defs = yes tst-tlsmod14a.so-no-z-defs = yes tst-tlsmod14b.so-no-z-defs = yes +tst-tlsmod15a.so-no-z-defs = yes circlemod2.so-no-z-defs = yes circlemod3.so-no-z-defs = yes circlemod3a.so-no-z-defs = yes @@ -683,8 +685,11 @@ $(objpfx)tst-tls12: $(objpfx)tst-tlsmod12.so $(objpfx)tst-tls13: $(libdl) $(objpfx)tst-tls13.out: $(objpfx)tst-tlsmod13a.so -$(objpfx)tst-tls14: $(objpfx)tst-tlsmod14a.so $(libdl) -$(objpfx)tst-tls14.out:$(objpfx)tst-tlsmod14b.so +$(objpfx)tst-tls14: $(objpfx)tst-tlsmod14a.so $(libdl) +$(objpfx)tst-tls14.out: $(objpfx)tst-tlsmod14b.so + +$(objpfx)tst-tls15: $(libdl) +$(objpfx)tst-tls15.out: $(objpfx)tst-tlsmod15a.so $(objpfx)tst-tlsmod15b.so CFLAGS-tst-align.c = $(stack-align-test-flags) CFLAGS-tst-align2.c = $(stack-align-test-flags) diff --git a/elf/dl-open.c b/elf/dl-open.c index 7433d99ff9..a65690e5a3 100644 --- a/elf/dl-open.c +++ b/elf/dl-open.c @@ -462,8 +462,10 @@ dl_open_worker (void *a) /* We have to bump the generation counter. */ any_tls = true; } +#endif } +#if USE_TLS /* Bump the generation number if necessary. */ if (any_tls && __builtin_expect (++GL(dl_tls_generation) == 0, 0)) _dl_fatal_printf (N_("\ diff --git a/elf/elf.h b/elf/elf.h index b84cc0e3ad..8a9f7fd482 100644 --- a/elf/elf.h +++ b/elf/elf.h @@ -2138,7 +2138,11 @@ typedef Elf32_Addr Elf32_Conflict; #define PF_ARM_SB 0x10000000 /* Segment contains the location addressed by the static base */ +/* Processor specific values for the Phdr p_type field. */ +#define PT_ARM_EXIDX 0x70000001 /* .ARM.exidx segment */ + /* ARM relocs. */ + #define R_ARM_NONE 0 /* No reloc */ #define R_ARM_PC24 1 /* PC relative 26 bit branch */ #define R_ARM_ABS32 2 /* Direct 32 bit */ diff --git a/elf/rtld.c b/elf/rtld.c index 720029dfc9..b2122bb9d6 100644 --- a/elf/rtld.c +++ b/elf/rtld.c @@ -1353,8 +1353,7 @@ ld.so does not support TLS, but program uses it!\n"); /* Since we start using the auditing DSOs right away we need to initialize the data structures now. */ - if (!TLS_INIT_TP_EXPENSIVE) - tcbp = init_tls (); + tcbp = init_tls (); #endif struct dlmopen_args dlmargs; dlmargs.fname = al->name; diff --git a/elf/tst-tls15.c b/elf/tst-tls15.c new file mode 100644 index 0000000000..7ac963aa2d --- /dev/null +++ b/elf/tst-tls15.c @@ -0,0 +1,32 @@ +#include <dlfcn.h> +#include <stdio.h> + +static int +do_test (void) +{ + void *h = dlopen ("tst-tlsmod15a.so", RTLD_NOW); + if (h != NULL) + { + puts ("unexpectedly succeeded to open tst-tlsmod15a.so"); + exit (1); + } + + h = dlopen ("tst-tlsmod15b.so", RTLD_NOW); + if (h == NULL) + { + puts ("failed to open tst-tlsmod15b.so"); + exit (1); + } + + int (*fp) (void) = (int (*) (void)) dlsym (h, "in_dso"); + if (fp == NULL) + { + puts ("cannot find in_dso"); + exit (1); + } + + return fp (); +} + +#define TEST_FUNCTION do_test () +#include "../test-skeleton.c" diff --git a/elf/tst-tlsmod15a.c b/elf/tst-tlsmod15a.c new file mode 100644 index 0000000000..66c707129a --- /dev/null +++ b/elf/tst-tlsmod15a.c @@ -0,0 +1,6 @@ +extern int nonexistent_dummy_var; +int * +foo (void) +{ + return &nonexistent_dummy_var; +} diff --git a/elf/tst-tlsmod15b.c b/elf/tst-tlsmod15b.c new file mode 100644 index 0000000000..4f63eab144 --- /dev/null +++ b/elf/tst-tlsmod15b.c @@ -0,0 +1,17 @@ +#include "tst-tls10.h" + +#ifdef USE_TLS__THREAD +__thread int mod15b_var __attribute__((tls_model("initial-exec"))); + +int +in_dso (void) +{ + return mod15b_var; +} +#else +int +in_dso (void) +{ + return 0; +} +#endif |