From: "Arsen Arsenović" <arsen@gentoo.org>
To: libc-alpha@sourceware.org
Cc: fweimer@redhat.com, arsen@gentoo.org, carlos@redhat.com,
toolchain@gentoo.org
Subject: [PATCH v3 1/2] elf,nptl: Add -z lazy to some more tests
Date: Tue, 7 Mar 2023 11:29:34 +0100 [thread overview]
Message-ID: <20230307102935.2882450-1-arsen@gentoo.org> (raw)
Some toolchains, such as that used on Gentoo Hardened, set -z now out of
the box. This trips up a couple of tests.
---
Hi,
This is re-roll of the following patch series:
https://inbox.sourceware.org/libc-alpha/20230307003222.2810662-1-arsen@aarsen.me/
https://inbox.sourceware.org/libc-alpha/20230302112519.914641-1-arsen@gentoo.org/
Changes from v2:
- Split off the +$(objpfx)resolvfail.out: $(objpfx)testobj1.so change
into its own commit.
Changes from v1:
- Dropped -z norelro. This turned out to be unnecessary after
Adhemervals removal of --with-default-link and linker script
machinery:
https://patchwork.sourceware.org/project/glibc/list/?series=17843
See: https://inbox.sourceware.org/libc-alpha/86fsakz5mr.fsf@gentoo.org
for an explanation of what caused the need for norelro. That fix was
misguided, due to a previous error on my part, too.
I applied this patch on top of that patchset and it would appear to
resolve all related failures.
The above is not applied to Git yet, but should be before this patch
is.
elf/Makefile | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
elf/Makefile | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/elf/Makefile b/elf/Makefile
index dcdfd0af87..b9c77604b5 100644
--- a/elf/Makefile
+++ b/elf/Makefile
@@ -1176,6 +1176,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 \
@@ -1498,6 +1503,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
--
2.39.2
next reply other threads:[~2023-03-07 10:45 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-07 10:29 Arsen Arsenović [this message]
2023-03-07 10:29 ` [PATCH v3 2/2] elf: Add missing dependency between resolvfail and testobj1.so Arsen Arsenović
2023-03-07 11:42 ` [PATCH v3 1/2] elf,nptl: Add -z lazy to some more tests Florian Weimer
2023-03-07 11:53 ` Arsen Arsenović
2023-03-07 12:08 ` Florian Weimer
2023-03-07 12:18 ` Arsen Arsenović
2023-03-07 12:28 ` Florian Weimer
2023-03-07 18:47 ` Arsen Arsenović
2023-03-10 16:54 ` Florian Weimer
2023-03-10 17:17 ` Arsen Arsenović
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230307102935.2882450-1-arsen@gentoo.org \
--to=arsen@gentoo.org \
--cc=carlos@redhat.com \
--cc=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=toolchain@gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).