diff options
author | Ulrich Drepper <drepper@redhat.com> | 2002-12-30 20:25:40 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2002-12-30 20:25:40 +0000 |
commit | cfaf5e56c8051df686d22d1e5f414dc5e7fdfbe5 (patch) | |
tree | 5a504468a5a648fbbf07e04c13b0248c269e2c03 | |
parent | 31df0ab098442ccd9fdc7571b624d26137361089 (diff) | |
download | glibc-cfaf5e56c8051df686d22d1e5f414dc5e7fdfbe5.zip glibc-cfaf5e56c8051df686d22d1e5f414dc5e7fdfbe5.tar.gz glibc-cfaf5e56c8051df686d22d1e5f414dc5e7fdfbe5.tar.bz2 |
Update.
2002-12-30 Ulrich Drepper <drepper@redhat.com>
* elf/Makefile: Add rules to build and run reldep8 test.
* elf/reldep8.c: New file.
* elf/reldep8mod1.c: New file.
* elf/reldep8mod2.c: New file.
* elf/reldep8mod3.c: New file.
Contributed by Jakub Jelinek.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | elf/Makefile | 14 | ||||
-rw-r--r-- | elf/reldep8.c | 16 | ||||
-rw-r--r-- | elf/reldep8mod1.c | 19 | ||||
-rw-r--r-- | elf/reldep8mod2.c | 7 | ||||
-rw-r--r-- | elf/reldep8mod3.c | 1 |
6 files changed, 62 insertions, 4 deletions
@@ -1,3 +1,12 @@ +2002-12-30 Ulrich Drepper <drepper@redhat.com> + + * elf/Makefile: Add rules to build and run reldep8 test. + * elf/reldep8.c: New file. + * elf/reldep8mod1.c: New file. + * elf/reldep8mod2.c: New file. + * elf/reldep8mod3.c: New file. + Contributed by Jakub Jelinek. + 2002-12-24 GOTO Masanori <gotom@debian.or.jp> * sysdeps/unix/sysv/linux/getdents.c (__GETDENTS): Fix condition diff --git a/elf/Makefile b/elf/Makefile index 819d336..babbec7 100644 --- a/elf/Makefile +++ b/elf/Makefile @@ -72,7 +72,8 @@ distribute := rtld-Rules \ tst-tlsmod5.c tst-tlsmod6.c \ circlemod1.c circlemod1a.c circlemod2.c circlemod2a.c \ circlemod3.c circlemod3a.c nodlopenmod2.c \ - tls-macros.h + tls-macros.h \ + reldep8mod1.c reldep8mod2.c reldep8mod3.c include ../Makeconfig @@ -135,8 +136,8 @@ tests += loadtest restest1 preloadtest loadfail multiload origtest resolvfail \ reldep reldep2 reldep3 reldep4 $(tests-nodelete-$(have-z-nodelete)) \ $(tests-nodlopen-$(have-z-nodlopen)) neededtest neededtest2 \ neededtest3 neededtest4 unload2 lateglobal initfirst global \ - restest2 next dblload dblunload reldep5 reldep6 reldep7 circleload1 \ - tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7 tst-tls8 + restest2 next dblload dblunload reldep5 reldep6 reldep7 reldep8 \ + circleload1 tst-tls3 tst-tls4 tst-tls5 tst-tls6 tst-tls7 tst-tls8 test-srcs = tst-pathopt tests-vis-yes = vismain tests-nodelete-yes = nodelete @@ -158,7 +159,8 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \ tst-tlsmod1 tst-tlsmod2 tst-tlsmod3 tst-tlsmod4 \ tst-tlsmod5 tst-tlsmod6 \ circlemod1 circlemod1a circlemod2 circlemod2a \ - circlemod3 circlemod3a + circlemod3 circlemod3a \ + reldep8mod1 reldep8mod2 reldep8mod3 ifeq (yes,$(have-initfini-array)) modules-names += tst-array2dep endif @@ -361,6 +363,7 @@ $(objpfx)reldep6mod2.so: $(objpfx)reldep6mod1.so $(objpfx)reldep6mod3.so: $(objpfx)reldep6mod2.so $(objpfx)reldep6mod4.so: $(objpfx)reldep6mod1.so $(objpfx)tst-tlsmod3.so: $(objpfx)tst-tlsmod2.so +$(objpfx)reldepmod3.so: $(objpfx)reldepmod1.so $(objpfx)reldepmod2.so LDFLAGS-tst-tlsmod5.so = -nostdlib LDFLAGS-tst-tlsmod6.so = -nostdlib @@ -525,6 +528,9 @@ $(objpfx)reldep6.out: $(objpfx)reldep6mod3.so $(objpfx)reldep6mod4.so $(objpfx)reldep7: $(libdl) $(objpfx)reldep7.out: $(objpfx)reldep7mod1.so $(objpfx)reldep7mod2.so +$(objpfx)reldep8: $(libdl) +$(objpfx)reldep8.out: $(objpfx)reldep8mod3.so + $(objpfx)tst-tls3: $(objpfx)tst-tlsmod1.so $(objpfx)tst-tls4: $(libdl) diff --git a/elf/reldep8.c b/elf/reldep8.c new file mode 100644 index 0000000..90009a5 --- /dev/null +++ b/elf/reldep8.c @@ -0,0 +1,16 @@ +#include <stdio.h> +#include <stdlib.h> +#include <dlfcn.h> + +int +main (void) +{ + void *handle = dlopen ("reldep8mod3.so", RTLD_LAZY); + if (handle == NULL) + { + printf ("%s\n", dlerror ()); + exit (1); + } + dlclose (handle); + abort (); +} diff --git a/elf/reldep8mod1.c b/elf/reldep8mod1.c new file mode 100644 index 0000000..acddc4c --- /dev/null +++ b/elf/reldep8mod1.c @@ -0,0 +1,19 @@ +#include <stdlib.h> +void +foo (void) +{ + exit (0); +} + +void +__attribute__((destructor)) +bar (void) +{ + static int i; + foo (); + ++i; +} +void +baz (void) +{ +} diff --git a/elf/reldep8mod2.c b/elf/reldep8mod2.c new file mode 100644 index 0000000..d002024 --- /dev/null +++ b/elf/reldep8mod2.c @@ -0,0 +1,7 @@ +void +__attribute__((constructor)) +xxx (void) +{ + extern void baz (void); + baz (); +} diff --git a/elf/reldep8mod3.c b/elf/reldep8mod3.c new file mode 100644 index 0000000..6d1a0d4 --- /dev/null +++ b/elf/reldep8mod3.c @@ -0,0 +1 @@ +int x; |