aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArsen Arsenović <arsen@gentoo.org>2023-03-07 11:29:34 +0100
committerFlorian Weimer <fweimer@redhat.com>2023-03-10 17:53:15 +0100
commit6c7388d0b95ef9ae39fbe6f733e2c5049769c4f9 (patch)
treef2e92972846c573cada89ae352cd39817f376eb2
parent10f980d31e3d65c4c5bfafd176e7e1db92e2babe (diff)
downloadglibc-6c7388d0b95ef9ae39fbe6f733e2c5049769c4f9.zip
glibc-6c7388d0b95ef9ae39fbe6f733e2c5049769c4f9.tar.gz
glibc-6c7388d0b95ef9ae39fbe6f733e2c5049769c4f9.tar.bz2
elf: Add -z lazy to some more tests
Some toolchains, such as that used on Gentoo Hardened, set -z now out of the box. This trips up a couple of tests. Reviewed-by: Florian Weimer <fweimer@redhat.com>
-rw-r--r--elf/Makefile19
1 files changed, 19 insertions, 0 deletions
diff --git a/elf/Makefile b/elf/Makefile
index 0d19964..e5df78f 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -1190,6 +1190,11 @@ postclean-generated += $(objpfx)/dso-sort-tests-2.generated-makefile \
ifeq (yes,$(have-tunables))
$(eval $(call include_dsosort_tests,dso-sort-tests-1.def))
$(eval $(call include_dsosort_tests,dso-sort-tests-2.def))
+
+# BZ15311 is intentionally underlinked.
+LDFLAGS-tst-bz15311-b.so += -Wl,-z,lazy
+LDFLAGS-tst-bz15311-c.so += -Wl,-z,lazy
+LDFLAGS-tst-bz15311-d.so += -Wl,-z,lazy
endif
check-abi: $(objpfx)check-abi-ld.out \
@@ -1514,6 +1519,20 @@ LDFLAGS-tst-initorderb2.so = -Wl,--no-as-needed
LDFLAGS-tst-tlsmod5.so = -nostdlib -Wl,--no-as-needed
LDFLAGS-tst-tlsmod6.so = -nostdlib -Wl,--no-as-needed
+# The following tests are underlinked, and rely on late loading. On toolchains
+# that set -z now by default, this leads to failures to load or fix up the
+# executables being tested.
+LDFLAGS-circlemod2.so = -Wl,-z,lazy
+LDFLAGS-tst-tls20mod-bad.so = -Wl,-z,lazy
+LDFLAGS-reldep6mod1.so += -Wl,-z,lazy
+LDFLAGS-constload2.so = -Wl,-z,lazy
+LDFLAGS-constload3.so = -Wl,-z,lazy
+LDFLAGS-dblloadmod3.so = -Wl,-z,lazy
+LDFLAGS-ifuncmod6.so = -Wl,-z,lazy
+LDFLAGS-ltglobmod2.so = -Wl,-z,lazy
+LDFLAGS-testobj1.so = -Wl,-z,lazy
+LDFLAGS-testobj6.so = -Wl,-z,lazy
+
testobj1.so-no-z-defs = yes
testobj3.so-no-z-defs = yes
testobj4.so-no-z-defs = yes