[binutils-gdb] ld/ELF: explicitly place .note.gnu.property

Jan Beulich jbeulich@sourceware.org
Tue Aug 26 08:44:11 GMT 2025


https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=6f9157ad377e8ff61a0f96f0e7b47babbc2b014e

commit 6f9157ad377e8ff61a0f96f0e7b47babbc2b014e
Author: Jan Beulich <jbeulich@suse.com>
Date:   Tue Aug 26 10:42:31 2025 +0200

    ld/ELF: explicitly place .note.gnu.property
    
    x86 gas may produce .note.gnu.property by default. Hence the default
    linker script would better also deal with that section, rather than
    causing diagnostics when using --orphan-handling=. Replace all mis-
    spellings that have accumulated.
    
    To avoid needlessly relaxing expectations for two tests when run for
    PPC 64-bit ELF targets, suppress the linker generating EH frame data
    there.

Diff:
---
 ld/scripttempl/elf.sc                          | 2 +-
 ld/testsuite/ld-aarch64/protections/bti-far.ld | 2 +-
 ld/testsuite/ld-aarch64/protections/bti-plt.ld | 2 +-
 ld/testsuite/ld-elf/elf.exp                    | 3 +++
 4 files changed, 6 insertions(+), 3 deletions(-)

diff --git a/ld/scripttempl/elf.sc b/ld/scripttempl/elf.sc
index be8d19fcf11..6d34912e45d 100644
--- a/ld/scripttempl/elf.sc
+++ b/ld/scripttempl/elf.sc
@@ -734,7 +734,7 @@ cat <<EOF
      data, but this is not guaranteed to always be the case.  */
   .note.build-id :      { *(.note.build-id) } ${RELOCATING+${REGION}}
   .note.GNU-stack :     { *(.note.GNU-stack) } ${RELOCATING+${REGION}}
-  .note.gnu-property :  { *(.note.gnu-property) } ${RELOCATING+${REGION}}
+  .note.gnu.property :  { *(.note.gnu.property) } ${RELOCATING+${REGION}}
   .note.ABI-tag :       { *(.note.ABI-tag) } ${RELOCATING+${REGION}}
   .note.package :       { *(.note.package) } ${RELOCATING+${REGION}}
   .note.dlopen :        { *(.note.dlopen) } ${RELOCATING+${REGION}}
diff --git a/ld/testsuite/ld-aarch64/protections/bti-far.ld b/ld/testsuite/ld-aarch64/protections/bti-far.ld
index 1568f184a30..d3ed90428e2 100644
--- a/ld/testsuite/ld-aarch64/protections/bti-far.ld
+++ b/ld/testsuite/ld-aarch64/protections/bti-far.ld
@@ -19,7 +19,7 @@ SECTIONS
   . = 0x12340000;
   .far               : { *(.far) }
   /* Start of the Read Only Data region.  */
-  .note.gnu-property : { *(.note.gnu-property) }
+  .note.gnu.property : { *(.note.gnu.property) }
 
   /* Start of the Read Write Data region.  */
   . = ALIGN (CONSTANT (MAXPAGESIZE));
diff --git a/ld/testsuite/ld-aarch64/protections/bti-plt.ld b/ld/testsuite/ld-aarch64/protections/bti-plt.ld
index c930fc8c372..fffb8a98cd4 100644
--- a/ld/testsuite/ld-aarch64/protections/bti-plt.ld
+++ b/ld/testsuite/ld-aarch64/protections/bti-plt.ld
@@ -17,7 +17,7 @@ SECTIONS
   . = 0x20000;
   .text              : { *(.text) }
   /* Start of the Read Only Data region.  */
-  .note.gnu-property : { *(.note.gnu-property) }
+  .note.gnu.property : { *(.note.gnu.property) }
 
   /* Start of the Read Write Data region.  */
   . = ALIGN (CONSTANT (MAXPAGESIZE));
diff --git a/ld/testsuite/ld-elf/elf.exp b/ld/testsuite/ld-elf/elf.exp
index bb1f0eb6d65..098e712e7b0 100644
--- a/ld/testsuite/ld-elf/elf.exp
+++ b/ld/testsuite/ld-elf/elf.exp
@@ -86,6 +86,9 @@ run_ld_link_tests [list \
 
 if [is_elf64 tmpdir/symbol3w.a] {
     set ASFLAGS "$ASFLAGS --defsym ALIGN=3"
+    if { [istarget powerpc*-*-linux*] } {
+	set LDFLAGS "$LDFLAGS --no-ld-generated-unwind-info"
+    }
     set pr23900_1_exp "pr23900-1-64.rd"
     set pr25490_2_exp "pr25490-2-64.rd"
     set pr25490_3_exp "pr25490-3-64.rd"


More information about the Binutils-cvs mailing list