diff options
author | Fangrui Song <maskray@google.com> | 2022-11-08 20:56:59 -0800 |
---|---|---|
committer | Fangrui Song <maskray@google.com> | 2022-11-08 20:56:59 -0800 |
commit | 2ae7990542e1955097aa21943e416dec70f867fa (patch) | |
tree | ed8363027c718acb05e3bb148e81da794ac821a3 /Makerules | |
parent | 52cf11004eb10f8ebbc193fbdf4094cfecb3dbff (diff) | |
download | glibc-2ae7990542e1955097aa21943e416dec70f867fa.tar glibc-2ae7990542e1955097aa21943e416dec70f867fa.tar.gz glibc-2ae7990542e1955097aa21943e416dec70f867fa.tar.bz2 glibc-2ae7990542e1955097aa21943e416dec70f867fa.zip |
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>
Diffstat (limited to 'Makerules')
-rw-r--r-- | Makerules | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -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 \ |