public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
To: binutils@sourceware.org
Subject: [PATCH] ld: Extend ac_default_ld_warn_rwx_segments to all SPARC targets [PR29411]
Date: Thu, 28 Jul 2022 16:11:09 +0200	[thread overview]
Message-ID: <yddh731gwea.fsf@CeBiTec.Uni-Bielefeld.DE> (raw)

[-- Attachment #1: Type: text/plain, Size: 783 bytes --]

As discussed in PR ld/29411, the ld warning

	[...] has a LOAD segment with RWX permissions

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.

Tested on sparc64-unknown-linux-gnu and sparc-sun-solaris2.11.

Ok for master and the 2.39 branch?

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University


2022-07-28  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	ld:
	PR ld/29411
	* configure.tgt (ac_default_ld_warn_rwx_segments): Extend to all
	sparc targets.  Expand comment.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: ld-warn-rwx-sparc.patch --]
[-- Type: text/x-patch, Size: 729 bytes --]

diff --git a/ld/configure.tgt b/ld/configure.tgt
--- a/ld/configure.tgt
+++ b/ld/configure.tgt
@@ -49,13 +49,13 @@ if test "${ac_default_ld_warn_rwx_segmen
   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=0
       ;;
     *)

             reply	other threads:[~2022-07-28 14:11 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-28 14:11 Rainer Orth [this message]
2022-07-28 15:20 ` Nick Clifton

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=yddh731gwea.fsf@CeBiTec.Uni-Bielefeld.DE \
    --to=ro@cebitec.uni-bielefeld.de \
    --cc=binutils@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: 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).