public inbox for glibc-cvs@sourceware.org help / color / mirror / Atom feed
From: Fangrui Song <maskray@sourceware.org> To: glibc-cvs@sourceware.org Subject: [glibc] Makerules: Generate shlib.lds with -fuse-ld=bfd Date: Wed, 9 Nov 2022 04:57:00 +0000 (GMT) [thread overview] Message-ID: <20221109045700.E26F43858C53@sourceware.org> (raw) https://sourceware.org/git/gitweb.cgi?p=glibc.git;h=2ae7990542e1955097aa21943e416dec70f867fa commit 2ae7990542e1955097aa21943e416dec70f867fa Author: Fangrui Song <maskray@google.com> Date: Tue Nov 8 20:56:59 2022 -0800 Makerules: Generate shlib.lds with -fuse-ld=bfd lld does not dump a linker script with --verbose (it does not use a linker script driven design and lots of linker processing is not serializable as a linker script anyway). With the default --with-default-link=no build, $@T is empty and makes `test -s $@T` fail. Just dump the linker script with -fuse-ld=bfd. lld since 15 (https://reviews.llvm.org/D124656) supports custom RELRO sections in the GNU ld dumped linker script. Reviewed-by: Sam James <sam@gentoo.org> Diff: --- Makerules | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makerules b/Makerules index 09c0cf8357..a41491429e 100644 --- a/Makerules +++ b/Makerules @@ -546,14 +546,16 @@ endef ifeq (yes,$(use-default-link)) # If the linker is good enough, we can let it use its default linker script. +# In the long term the custom linker script will be removed. shlib-lds = shlib-lds-flags = else # binutils only position loadable notes into the first page for binaries, # not for shared objects +# lld --verbose does not dump a linker script. Use -fuse-ld=bfd. $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules $(LINK.o) -shared -Wl,-O1 \ - -nostdlib -nostartfiles \ + -nostdlib -nostartfiles -fuse-ld=bfd \ $(sysdep-LDFLAGS) $(rtld-LDFLAGS) $(LDFLAGS.so) \ -Wl,--verbose 2>/dev/null | \ sed > $@T \
reply other threads:[~2022-11-09 4:57 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=20221109045700.E26F43858C53@sourceware.org \ --to=maskray@sourceware.org \ --cc=glibc-cvs@sourceware.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: linkBe 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).