]> sourceware.org Git - glibc.git/commitdiff
Update.
authorUlrich Drepper <drepper@redhat.com>
Sun, 4 Mar 2001 19:51:54 +0000 (19:51 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 4 Mar 2001 19:51:54 +0000 (19:51 +0000)
* elf/global.c: New file.
* elf/globalmod1.c: New file.
* elf/Makefile: Add rules to build and run global.

ChangeLog
elf/Makefile
elf/global.c [new file with mode: 0644]
elf/globalmod1.c [new file with mode: 0644]

index 1e158d76c5a21e13dd47c851a0afa307d2553245..ae86a2ab785e7f5794e9d8626fd749cd6e694b11 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2001-03-04  Ulrich Drepper  <drepper@redhat.com>
 
+       * elf/global.c: New file.
+       * elf/globalmod1.c: New file.
+       * elf/Makefile: Add rules to build and run global.
+
        * sysdeps/unix/sysv/linux/alpha/bits/siginfo.h: Define SI_ASYNCNL.
        * sysdeps/unix/sysv/linux/ia64/bits/siginfo.h: Likewise.
        * sysdeps/unix/sysv/linux/mips/bits/siginfo.h: Likewise.
index 39f14783be90403b0e75f5ec4e6c5b83ab83a3ec..8b243e5daf29446cc87e9e9136f3975fc990b558 100644 (file)
@@ -57,7 +57,7 @@ distribute    := $(rtld-routines:=.c) dynamic-link.h do-rel.h dl-machine.h \
                   neededobj1.c neededobj2.c neededobj3.c neededobj4.c \
                   neededobj5.c neededobj6.c firstobj.c \
                   unload2mod.c unload2dep.c ltglobmod1.c ltglobmod2.c \
-                  testobj.h vismod.h
+                  testobj.h vismod.h globalmod1.c
 
 include ../Makeconfig
 
@@ -101,7 +101,7 @@ tests = loadtest restest1 preloadtest loadfail multiload origtest resolvfail \
        constload1 order $(tests-vis-$(have-protected)) noload filter unload \
        reldep reldep2 reldep3 next $(tests-nodelete-$(have-z-nodelete)) \
        $(tests-nodlopen-$(have-z-nodlopen)) neededtest neededtest2 \
-       neededtest3 neededtest4 unload2 lateglobal initfirst
+       neededtest3 neededtest4 unload2 lateglobal initfirst global
 test-srcs = tst-pathopt
 tests-vis-yes = vismain
 tests-nodelete-yes = nodelete
@@ -114,7 +114,7 @@ modules-names = testobj1 testobj2 testobj3 testobj4 testobj5 testobj6 \
                $(modules-nodlopen-$(have-z-nodlopen)) filtmod1 filtmod2 \
                reldepmod1 reldepmod2 reldepmod3 reldepmod4 nextmod1 nextmod2 \
                neededobj1 neededobj2 neededobj3 neededobj4 \
-               neededobj5 neededobj6 firstobj \
+               neededobj5 neededobj6 firstobj globalmod1 \
                unload2mod unload2dep ltglobmod1 ltglobmod2 pathoptobj
 modules-vis-yes = vismod1 vismod2 vismod3
 modules-nodelete-yes = nodelmod1 nodelmod2 nodelmod3 nodelmod4
@@ -271,6 +271,7 @@ $(objpfx)neededobj6.so: $(objpfx)neededobj5.so
 $(objpfx)unload2mod.so: $(objpfx)unload2dep.so
 $(objpfx)ltglobmod2.so: $(libdl)
 $(objpfx)firstobj.so: $(shared-thread-library)
+$(objpfx)globalmod1.so: $(libdl)
 
 # filtmod1.so has a special rule
 $(filter-out $(objpfx)filtmod1.so, $(test-modules)): $(objpfx)%.so: $(objpfx)%.os
@@ -394,3 +395,6 @@ $(objpfx)tst-pathopt.out: tst-pathopt.sh $(objpfx)tst-pathopt \
 
 $(objpfx)initfirst: $(libdl)
 $(objpfx)initfirst.out: $(objpfx)firstobj.so
+
+$(objpfx)global: $(objpfx)globalmod1.so
+$(objpfx)global.out: $(objpfx)reldepmod1.so
diff --git a/elf/global.c b/elf/global.c
new file mode 100644 (file)
index 0000000..6a4d960
--- /dev/null
@@ -0,0 +1,7 @@
+extern int test (void);
+
+int
+main()
+{
+  return test ();
+}
diff --git a/elf/globalmod1.c b/elf/globalmod1.c
new file mode 100644 (file)
index 0000000..778a558
--- /dev/null
@@ -0,0 +1,15 @@
+#include <dlfcn.h>
+#include <stdio.h>
+
+int
+test (void)
+{
+  (void) dlopen ("reldepmod4.so", RTLD_LAZY | RTLD_GLOBAL);
+  if (dlsym (RTLD_DEFAULT, "call_me") != NULL)
+    {
+      puts ("found \"call_me\"");
+      return 0;
+    }
+  puts ("didn't find \"call_me\"");
+  return 1;
+}
This page took 0.082136 seconds and 5 git commands to generate.