From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: by sourceware.org (Postfix, from userid 1147) id C9EF5385780E; Fri, 29 Jul 2022 07:07:01 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org C9EF5385780E Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable From: Rainer Orth To: bfd-cvs@sourceware.org Subject: [binutils-gdb] ld: Extend ac_default_ld_warn_rwx_segments to all SPARC targets [PR29411] X-Act-Checkin: binutils-gdb X-Git-Author: Rainer Orth X-Git-Refname: refs/heads/master X-Git-Oldrev: b245c595aaa59812f8f3a0e8b70ea5f52e045627 X-Git-Newrev: b80b72c06c29d257b60b4002bd9d6c40dec94ec9 Message-Id: <20220729070701.C9EF5385780E@sourceware.org> Date: Fri, 29 Jul 2022 07:07:01 +0000 (GMT) X-BeenThere: binutils-cvs@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binutils-cvs mailing list List-Unsubscribe: , List-Archive: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 29 Jul 2022 07:07:01 -0000 https://sourceware.org/git/gitweb.cgi?p=3Dbinutils-gdb.git;h=3Db80b72c06c29= d257b60b4002bd9d6c40dec94ec9 commit b80b72c06c29d257b60b4002bd9d6c40dec94ec9 Author: Rainer Orth Date: Fri Jul 29 09:06:40 2022 +0200 ld: Extend ac_default_ld_warn_rwx_segments to all SPARC targets [PR2941= 1] =20 As discussed in PR ld/29411, the ld warning =20 [...] has a LOAD segment with RWX permissions =20 needs to be disabled on all SPARC targets, not just Solaris/SPARC: the .plt section is required to be RWX by the 32-bit SPARC ELF psABI and the 64-bit SPARC Compliance Definition 2.4.1. Given that ld only supports SPARC ELF targets, this patch implements this. =20 Tested on sparc64-unknown-linux-gnu and sparc-sun-solaris2.11. =20 2022-07-28 Rainer Orth =20 ld: PR ld/29411 * configure.tgt (ac_default_ld_warn_rwx_segments): Extend to all sparc targets. Expand comment. Diff: --- ld/ChangeLog | 6 ++++++ ld/configure.tgt | 6 +++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/ld/ChangeLog b/ld/ChangeLog index ac1365a16c6..30fc1937d06 100644 --- a/ld/ChangeLog +++ b/ld/ChangeLog @@ -1,3 +1,9 @@ +2022-07-29 Rainer Orth + + PR ld/29411 + * configure.tgt (ac_default_ld_warn_rwx_segments): Extend to all + sparc targets. Expand comment. + 2022-07-26 Nick Clifton =20 PR 29411 diff --git a/ld/configure.tgt b/ld/configure.tgt index 1a3c7df0ae8..2bae9099b6a 100644 --- a/ld/configure.tgt +++ b/ld/configure.tgt @@ -49,13 +49,13 @@ if test "${ac_default_ld_warn_rwx_segments}" =3D unset;= then case "${targ}" in # The CRIS default linker script yields just one segment # as intended, so a rwx segment warning is not helpful. - # The HPPA's PLT section uses a constructed trampoline + # The HPPA's and SPARC's PLT sections use a constructed trampoline # hence it needs to have a RWX segment. # Many MIPS targets use executable segments. cris-*-* | crisv32-*-* | \ hppa*-*-* | \ - sparc*-*-solaris2* | \ - mips*-*-*) + mips*-*-* | \ + sparc*-*-*) ac_default_ld_warn_rwx_segments=3D0 ;; *)