diff options
author | Maciej W. Rozycki <macro@codesourcery.com> | 2013-06-28 16:20:26 +0100 |
---|---|---|
committer | Maciej W. Rozycki <macro@codesourcery.com> | 2013-06-28 16:22:20 +0100 |
commit | f91f1c0fb89056995f1c9c6a06c361efdf5139e7 (patch) | |
tree | 67db98c499e8dbd72bc5b49e654706d375384c0f /dlfcn/Makefile | |
parent | ed0257f7d3378ec4a72e297f0dcba5159f2dd138 (diff) | |
download | glibc-f91f1c0fb89056995f1c9c6a06c361efdf5139e7.tar.gz glibc-f91f1c0fb89056995f1c9c6a06c361efdf5139e7.tar.xz glibc-f91f1c0fb89056995f1c9c6a06c361efdf5139e7.zip |
[BZ #15022] Correct global-scope dlopen issues in static executables.
This change creates a link map in static executables to serve as the global search list for dlopen. It fixes a problem with the inability to access the global symbol object and a crash on an attempt to map a DSO into the global scope. Some code that has become dead after the addition of this link map is removed too and test cases are provided.
Diffstat (limited to 'dlfcn/Makefile')
-rw-r--r-- | dlfcn/Makefile | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/dlfcn/Makefile b/dlfcn/Makefile index 20e6f0294e..fca0951a5a 100644 --- a/dlfcn/Makefile +++ b/dlfcn/Makefile @@ -47,11 +47,13 @@ glreflib2.so-no-z-defs = yes errmsg1mod.so-no-z-defs = yes ifeq (yes,$(build-shared)) -tests += tststatic tststatic2 -tests-static += tststatic tststatic2 -modules-names += modstatic modstatic2 +tests += tststatic tststatic2 tststatic3 tststatic4 +tests-static += tststatic tststatic2 tststatic3 tststatic4 +modules-names += modstatic modstatic2 modstatic3 tststatic-ENV = LD_LIBRARY_PATH=$(objpfx):$(common-objpfx):$(common-objpfx)elf tststatic2-ENV = $(tststatic-ENV) +tststatic3-ENV = $(tststatic-ENV) +tststatic4-ENV = $(tststatic-ENV) endif extra-test-objs += $(modules-names:=.os) @@ -104,6 +106,12 @@ $(objpfx)tststatic2.out: $(objpfx)tststatic2 $(objpfx)modstatic.so \ $(objpfx)modstatic2.so: $(libdl) +$(objpfx)tststatic3: $(objpfx)libdl.a +$(objpfx)tststatic3.out: $(objpfx)tststatic3 $(objpfx)modstatic3.so + +$(objpfx)tststatic4: $(objpfx)libdl.a +$(objpfx)tststatic4.out: $(objpfx)tststatic4 $(objpfx)modstatic3.so + $(objpfx)bug-dlopen1: $(libdl) $(objpfx)bug-dlsym1: $(libdl) $(objpfx)bug-dlsym1-lib2.so |