* [PATCH] ld: Extend ac_default_ld_warn_rwx_segments to all SPARC targets [PR29411]
@ 2022-07-28 14:11 Rainer Orth
2022-07-28 15:20 ` Nick Clifton
0 siblings, 1 reply; 2+ messages in thread
From: Rainer Orth @ 2022-07-28 14:11 UTC (permalink / raw)
To: binutils
[-- 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
;;
*)
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] ld: Extend ac_default_ld_warn_rwx_segments to all SPARC targets [PR29411]
2022-07-28 14:11 [PATCH] ld: Extend ac_default_ld_warn_rwx_segments to all SPARC targets [PR29411] Rainer Orth
@ 2022-07-28 15:20 ` Nick Clifton
0 siblings, 0 replies; 2+ messages in thread
From: Nick Clifton @ 2022-07-28 15:20 UTC (permalink / raw)
To: Rainer Orth, binutils
Hi Rainer,
> 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?
Approved - please apply to both.
Cheers
Nick
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2022-07-28 15:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-28 14:11 [PATCH] ld: Extend ac_default_ld_warn_rwx_segments to all SPARC targets [PR29411] Rainer Orth
2022-07-28 15:20 ` Nick Clifton
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).