Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Ulrich Drepper committed Dec 30, 2002
1 parent 31df0ab commit cfaf5e5
Show file tree
Hide file tree
Showing 6 changed files with 62 additions and 4 deletions.
9 changes: 9 additions & 0 deletions ChangeLog
@@ -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
Expand Down
14 changes: 10 additions & 4 deletions elf/Makefile
Expand Up @@ -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

Expand Down Expand Up @@ -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
Expand All @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down
16 changes: 16 additions & 0 deletions 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 ();
}
19 changes: 19 additions & 0 deletions 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)
{
}
7 changes: 7 additions & 0 deletions elf/reldep8mod2.c
@@ -0,0 +1,7 @@
void
__attribute__((constructor))
xxx (void)
{
extern void baz (void);
baz ();
}
1 change: 1 addition & 0 deletions elf/reldep8mod3.c
@@ -0,0 +1 @@
int x;

0 comments on commit cfaf5e5

Please sign in to comment.