aboutsummaryrefslogtreecommitdiff
path: root/dlfcn
diff options
context:
space:
mode:
Diffstat (limited to 'dlfcn')
-rw-r--r--dlfcn/Makefile10
-rw-r--r--dlfcn/glreflib3.c1
-rw-r--r--dlfcn/tst-dlinfo.c2
3 files changed, 8 insertions, 5 deletions
diff --git a/dlfcn/Makefile b/dlfcn/Makefile
index e8fbab2958..1324007e27 100644
--- a/dlfcn/Makefile
+++ b/dlfcn/Makefile
@@ -23,7 +23,8 @@ libdl-routines := dlopen dlclose dlsym dlvsym dlerror dladdr dladdr1 dlinfo \
dlmopen dlfcn
routines := $(patsubst %,s%,$(filter-out dlfcn,$(libdl-routines)))
elide-routines.os := $(routines)
-distribute := dlopenold.c glreflib1.c glreflib2.c failtestmod.c \
+distribute := dlopenold.c glreflib1.c glreflib2.c glreflib3.c \
+ failtestmod.c \
defaultmod1.c defaultmod2.c errmsg1mod.c modatexit.c \
modcxaatexit.c modstatic.c modstatic2.c \
bug-dlsym1-lib1.c bug-dlsym1-lib2.c bug-atexit1-lib.c \
@@ -43,8 +44,8 @@ tests = glrefmain failtest tst-dladdr default errmsg1 tstcxaatexit \
bug-dlopen1 bug-dlsym1 tst-dlinfo bug-atexit1 bug-atexit2 \
bug-atexit3 tstatexit
endif
-modules-names = glreflib1 glreflib2 failtestmod defaultmod1 defaultmod2 \
- errmsg1mod modatexit modcxaatexit \
+modules-names = glreflib1 glreflib2 glreflib3 failtestmod defaultmod1 \
+ defaultmod2 errmsg1mod modatexit modcxaatexit \
bug-dlsym1-lib1 bug-dlsym1-lib2 bug-atexit1-lib \
bug-atexit2-lib bug-atexit3-lib
@@ -83,7 +84,8 @@ $(objpfx)tst-dladdr: $(libdl)
$(objpfx)tst-dladdr.out: $(objpfx)glreflib1.so
$(objpfx)tst-dlinfo: $(libdl)
-$(objpfx)tst-dlinfo.out: $(objpfx)glreflib1.so
+$(objpfx)tst-dlinfo.out: $(objpfx)glreflib3.so
+LDFLAGS-glreflib3.so = -Wl,-rpath,:
LDFLAGS-default = $(LDFLAGS-rdynamic)
$(objpfx)default: $(libdl) $(objpfx)defaultmod1.so $(objpfx)defaultmod2.so
diff --git a/dlfcn/glreflib3.c b/dlfcn/glreflib3.c
new file mode 100644
index 0000000000..5ac7befa6b
--- /dev/null
+++ b/dlfcn/glreflib3.c
@@ -0,0 +1 @@
+#include "glreflib1.c"
diff --git a/dlfcn/tst-dlinfo.c b/dlfcn/tst-dlinfo.c
index 70906ebdf1..16355a1aa3 100644
--- a/dlfcn/tst-dlinfo.c
+++ b/dlfcn/tst-dlinfo.c
@@ -29,7 +29,7 @@ do_test (void)
{
int status = 0;
- void *handle = dlopen ("glreflib1.so", RTLD_NOW);
+ void *handle = dlopen ("glreflib3.so", RTLD_NOW);
if (handle == NULL)
error (EXIT_FAILURE, 0, "cannot load: glreflib1.so: %s", dlerror ());