From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) by sourceware.org (Postfix) with ESMTP id 89636385840E for ; Tue, 8 Nov 2022 00:06:32 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 89636385840E Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=gentoo.org Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=gentoo.org Content-Type: multipart/signed; boundary="Apple-Mail=_425B8881-4FAE-422F-B3EA-ECC5556AAD59"; protocol="application/pgp-signature"; micalg=pgp-sha512 Mime-Version: 1.0 (Mac OS X Mail 16.0 \(3731.200.110.1.12\)) Subject: Re: [PATCH] Makerules: Generate shlib.lds with -fuse-ld=bfd From: Sam James In-Reply-To: <87o7tjmaif.fsf@oldenburg.str.redhat.com> Date: Tue, 8 Nov 2022 00:06:16 +0000 Cc: Fangrui Song , libc-alpha@sourceware.org Message-Id: <96E39C71-C947-400A-B4BC-A07404C8BDDD@gentoo.org> References: <20221106181750.2859300-1-maskray@google.com> <87o7tjmaif.fsf@oldenburg.str.redhat.com> To: Florian Weimer X-Mailer: Apple Mail (2.3731.200.110.1.12) X-Spam-Status: No, score=-10.5 required=5.0 tests=BAYES_00,GIT_PATCH_0,JMQ_SPF_NEUTRAL,KAM_DMARC_STATUS,SPF_HELO_PASS,SPF_PASS,TXREP autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: --Apple-Mail=_425B8881-4FAE-422F-B3EA-ECC5556AAD59 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii > On 7 Nov 2022, at 08:31, Florian Weimer via Libc-alpha = wrote: >=20 > * Fangrui Song: >=20 >> 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=3Dno build, $@T is empty and makes `test -s $@T` = fail. >>=20 >> Just dump the linker script with -fuse-ld=3Dbfd. lld since 15 >> (https://reviews.llvm.org/D124656) supports custom RELRO sections in = the >> GNU ld dumped linker script. >> --- >> Makerules | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >>=20 >> diff --git a/Makerules b/Makerules >> index 09c0cf8357..2edc6ee4e1 100644 >> --- a/Makerules >> +++ b/Makerules >> @@ -553,7 +553,7 @@ else >> # not for shared objects >> $(common-objpfx)shlib.lds: $(common-objpfx)config.make $(..)Makerules >> $(LINK.o) -shared -Wl,-O1 \ >> - -nostdlib -nostartfiles \ >> + -nostdlib -nostartfiles -fuse-ld=3Dbfd \ >> $(sysdep-LDFLAGS) $(rtld-LDFLAGS) $(LDFLAGS.so) \ >> -Wl,--verbose 2>/dev/null | \ >> sed > $@T \ >=20 > Would you please add the comment? >=20 > I'm not sure if a configure check is required. We have a path towards > removal of the custom linker script; the vfprintf refactor I posted is = a > first step. >=20 That works for me. --Apple-Mail=_425B8881-4FAE-422F-B3EA-ECC5556AAD59 Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=signature.asc Content-Type: application/pgp-signature; name=signature.asc Content-Description: Message signed with OpenPGP -----BEGIN PGP SIGNATURE----- iNUEARYKAH0WIQQlpruI3Zt2TGtVQcJzhAn1IN+RkAUCY2mdeF8UgAAAAAAuAChp c3N1ZXItZnByQG5vdGF0aW9ucy5vcGVucGdwLmZpZnRoaG9yc2VtYW4ubmV0MjVB NkJCODhERDlCNzY0QzZCNTU0MUMyNzM4NDA5RjUyMERGOTE5MAAKCRBzhAn1IN+R kA1CAQCggk/1wncCYj4mLNDx0anDMfdHsM9GI9XZY4OW9KGRMwD+OVUhUqVe97+C twxor8HV0bGVOiq6fIKMJdw6phe5LQA= =n8l6 -----END PGP SIGNATURE----- --Apple-Mail=_425B8881-4FAE-422F-B3EA-ECC5556AAD59--