aboutsummaryrefslogtreecommitdiff
path: root/elf/Makefile
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-10-17 08:51:21 +0200
committerFlorian Weimer <fweimer@redhat.com>2019-10-17 08:51:21 +0200
commit7d3db434f910c23591f748a6d0ac3548af1048bb (patch)
treecd81091a7bde637d730cbba69fa68543bc4372c6 /elf/Makefile
parenteb77a1fccc7e60cea32245c11288c7f1d92545fa (diff)
downloadglibc-7d3db434f910c23591f748a6d0ac3548af1048bb.zip
glibc-7d3db434f910c23591f748a6d0ac3548af1048bb.tar.gz
glibc-7d3db434f910c23591f748a6d0ac3548af1048bb.tar.bz2
Rename and split elf/tst-dlopen-aout collection of tests
From the beginning, elf/tst-dlopen-aout has exercised two different bugs: (a) failure to report errors for a dlopen of the executable itself in some cases (bug 24900) and (b) incorrect rollback of the TLS modid allocation in case of a dlopen failure (bug 16634). This commit replaces the test with elf/tst-dlopen-self for (a) and elf/tst-dlopen-tlsmodid for (b). The latter tests use the elf/tst-dlopen-self binaries (or iconv) with dlopen, so they are no longer self-dlopen tests. Tested on x86_64-linux-gnu and i686-linux-gnu, with a toolchain that does not default to PIE.
Diffstat (limited to 'elf/Makefile')
-rw-r--r--elf/Makefile32
1 files changed, 22 insertions, 10 deletions
diff --git a/elf/Makefile b/elf/Makefile
index dea51ca..5e4cdb4 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -192,14 +192,16 @@ tests += restest1 preloadtest loadfail multiload origtest resolvfail \
tst-latepthread tst-tls-manydynamic tst-nodelete-dlclose \
tst-debug1 tst-main1 tst-absolute-sym tst-absolute-zero tst-big-note \
tst-unwind-ctor tst-unwind-main tst-audit13 \
- tst-sonamemove-link tst-sonamemove-dlopen tst-dlopen-aout
+ tst-sonamemove-link tst-sonamemove-dlopen tst-dlopen-tlsmodid \
+ tst-dlopen-self
# reldep9
tests-internal += loadtest unload unload2 circleload1 \
neededtest neededtest2 neededtest3 neededtest4 \
tst-tls3 tst-tls6 tst-tls7 tst-tls8 tst-dlmopen2 \
tst-ptrguard1 tst-stackguard1 tst-libc_dlvsym \
tst-create_format1
-tests-container += tst-pldd tst-dlopen-aout-container
+tests-container += tst-pldd tst-dlopen-tlsmodid-container \
+ tst-dlopen-self-container
test-srcs = tst-pathopt
selinux-enabled := $(shell cat /selinux/enforce 2> /dev/null)
ifneq ($(selinux-enabled),1)
@@ -308,8 +310,9 @@ test-xfail-tst-protected1b = yes
endif
ifeq (yesyes,$(have-fpie)$(build-shared))
modules-names += tst-piemod1
-tests += tst-pie1 tst-pie2 tst-dlopen-pie tst-dlopen-aout-pie
-tests-pie += tst-pie1 tst-pie2 tst-dlopen-aout-pie
+tests += tst-pie1 tst-pie2 tst-dlopen-pie tst-dlopen-tlsmodid-pie \
+ tst-dlopen-self-pie
+tests-pie += tst-pie1 tst-pie2 tst-dlopen-tlsmodid-pie tst-dlopen-self-pie
ifeq (yes,$(have-protected-data))
tests += vismain
tests-pie += vismain
@@ -1268,12 +1271,21 @@ $(objpfx)tst-addr1: $(libdl)
$(objpfx)tst-thrlock: $(libdl) $(shared-thread-library)
-tst-tst-dlopen-aout-no-pie = yes
-$(objpfx)tst-dlopen-aout: $(libdl) $(shared-thread-library)
-CFLAGS-tst-dlopen-aout-pie.c += $(pie-ccflag)
-$(objpfx)tst-dlopen-aout-pie: $(libdl) $(shared-thread-library)
-$(objpfx)tst-dlopen-aout-container: $(libdl) $(shared-thread-library)
-LDFLAGS-tst-dlopen-aout-container += -Wl,-rpath,\$$ORIGIN
+tst-tst-dlopen-tlsmodid-no-pie = yes
+$(objpfx)tst-dlopen-tlsmodid: $(libdl) $(shared-thread-library)
+$(objpfx)tst-dlopen-tlsmodid.out: $(objpfx)tst-dlopen-self
+CFLAGS-tst-dlopen-tlsmodid-pie.c += $(pie-ccflag)
+$(objpfx)tst-dlopen-tlsmodid-pie: $(libdl) $(shared-thread-library)
+$(objpfx)tst-dlopen-tlsmodid-pie.out: $(objpfx)tst-dlopen-self-pie
+$(objpfx)tst-dlopen-tlsmodid-container: $(libdl) $(shared-thread-library)
+LDFLAGS-tst-dlopen-tlsmodid-container += -Wl,-rpath,\$$ORIGIN
+
+tst-tst-dlopen-self-no-pie = yes
+$(objpfx)tst-dlopen-self: $(libdl)
+CFLAGS-tst-dlopen-self-pie.c += $(pie-ccflag)
+$(objpfx)tst-dlopen-self-pie: $(libdl)
+$(objpfx)tst-dlopen-self-container: $(libdl)
+LDFLAGS-tst-dlopen-self-container += -Wl,-rpath,\$$ORIGIN
CFLAGS-ifuncmain1pic.c += $(pic-ccflag)
CFLAGS-ifuncmain1picstatic.c += $(pic-ccflag)