public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: "Maciej W. Rozycki" <macro@orcam.me.uk>
To: Nick Clifton <nickc@redhat.com>
Cc: YunQiang Su <yunqiang.su@cipunited.com>, binutils@sourceware.org
Subject: [committed 02/16] MIPS/LD: Include n64 `.interp' with INITIAL_READONLY_SECTIONS
Date: Fri, 28 Jul 2023 06:06:38 +0100 (BST)	[thread overview]
Message-ID: <alpine.DEB.2.21.2307271534140.10240@angie.orcam.me.uk> (raw)
In-Reply-To: <alpine.DEB.2.21.2307271457290.10240@angie.orcam.me.uk>

From: YunQiang Su <yunqiang.su@cipunited.com>

In ld/emulparams/elf64bmip-defs.sh there is no explicit handling of the 
`.interp' section, which causes it to be positioned in output at an odd 
place.

Let's include it with INITIAL_READONLY_SECTIONS, just like o32/n32 do, 
fixing a regression from commit 5a8e7be242f3 ("INITIAL_READONLY_SECTIONS 
in elf.sc"), where the handling of n64 was missed due to an unfortunate 
sequence of events where ld/emulparams/elf64bmip-defs.sh was only added 
with commit 94bb04b3c611 ("Use .reginfo rather than .MIPS.options in n32 
linker scripts") the day before.

Add test cases covering section ordering across the three ABIs.  This 
change also fixes ld/pr23658-2:

FAIL: Build pr23658-2

Co-Authored-By: Maciej W. Rozycki <macro@orcam.me.uk>

ld/ChangeLog:
	* emulparams/elf64bmip-defs.sh: Include `.interp' with
	INITIAL_READONLY_SECTIONS.
	* testsuite/ld-mips-elf/pie-n64.d: Adjust addresses.
	* testsuite/ld-mips-elf/sections-1-o32.rd: New test.
	* testsuite/ld-mips-elf/sections-1-o32t.rd: New test.
	* testsuite/ld-mips-elf/sections-1-n32.rd: New test.
	* testsuite/ld-mips-elf/sections-1-n32t.rd: New test.
	* testsuite/ld-mips-elf/sections-1-n32p.rd: New test.
	* testsuite/ld-mips-elf/sections-1-n64.rd: New test.
	* testsuite/ld-mips-elf/sections-1-n64t.rd: New test.
	* testsuite/ld-mips-elf/sections-2-o32.rd: New test.
	* testsuite/ld-mips-elf/sections-2-o32t.rd: New test.
	* testsuite/ld-mips-elf/sections-2-n32.rd: New test.
	* testsuite/ld-mips-elf/sections-2-n32t.rd: New test.
	* testsuite/ld-mips-elf/sections-2-n32p.rd: New test.
	* testsuite/ld-mips-elf/sections-2-n64.rd: New test.
	* testsuite/ld-mips-elf/sections-2-n64t.rd: New test.
	* testsuite/ld-mips-elf/sections.s: New test source.
	* testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.
---
 ld/emulparams/elf64bmip-defs.sh             |    6 +++
 ld/testsuite/ld-mips-elf/mips-elf.exp       |   21 +++++++++++++
 ld/testsuite/ld-mips-elf/pie-n64.d          |   12 +++----
 ld/testsuite/ld-mips-elf/sections-1-n32.rd  |   36 ++++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-1-n32p.rd |   36 ++++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-1-n32t.rd |   36 ++++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-1-n64.rd  |   36 ++++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-1-n64t.rd |   36 ++++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-1-o32.rd  |   36 ++++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-1-o32t.rd |   36 ++++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-2-n32.rd  |   33 +++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-2-n32p.rd |   33 +++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-2-n32t.rd |   33 +++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-2-n64.rd  |   33 +++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-2-n64t.rd |   33 +++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-2-o32.rd  |   33 +++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections-2-o32t.rd |   33 +++++++++++++++++++++
 ld/testsuite/ld-mips-elf/sections.s         |   44 ++++++++++++++++++++++++++++
 18 files changed, 559 insertions(+), 7 deletions(-)

binutils-yunqiang-mips-ld-n64-interp.diff
Index: binutils-gdb/ld/emulparams/elf64bmip-defs.sh
===================================================================
--- binutils-gdb.orig/ld/emulparams/elf64bmip-defs.sh
+++ binutils-gdb/ld/emulparams/elf64bmip-defs.sh
@@ -1,6 +1,10 @@
 source_sh ${srcdir}/emulparams/elf32bmipn32-defs.sh
 COMMONPAGESIZE="CONSTANT (COMMONPAGESIZE)"
-INITIAL_READONLY_SECTIONS="
+INITIAL_READONLY_SECTIONS=
+if test -z "${CREATE_SHLIB}"; then
+  INITIAL_READONLY_SECTIONS=".interp       ${RELOCATING-0} : { *(.interp) }"
+fi
+INITIAL_READONLY_SECTIONS="${INITIAL_READONLY_SECTIONS}
   .MIPS.abiflags      ${RELOCATING-0} : { *(.MIPS.abiflags) }
   .MIPS.xhash      ${RELOCATING-0} : { *(.MIPS.xhash) }
   .MIPS.options : { *(.MIPS.options) }
Index: binutils-gdb/ld/testsuite/ld-mips-elf/mips-elf.exp
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/mips-elf.exp
+++ binutils-gdb/ld/testsuite/ld-mips-elf/mips-elf.exp
@@ -1669,3 +1669,24 @@ run_dump_test_n64 "global-local-symtab-s
 run_dump_test_o32 "global-local-symtab-final-o32"
 run_dump_test_n32 "global-local-symtab-final-n32"
 run_dump_test_n64 "global-local-symtab-final-n64"
+
+# Section ordering tests.
+foreach { abi } $abis {
+    set ps2 [expr \
+	({$abi} == {"n32"} && [istarget "mips64*el-ps2-elf*"]) ? {"p"} : {""}]
+    run_ld_link_tests [list \
+	[list \
+	    "MIPS section ordering test 1 ($abi)" \
+	    "$abi_ldflags($abi) -r" "" \
+	    "$abi_asflags($abi) -mpdr" \
+	    [list sections.s] \
+	    [list "readelf -WS sections-1-${abi}${tmips}${ps2}.rd"] \
+	    "sections-1-${abi}.o"] \
+	[list \
+	    "MIPS section ordering test 2 ($abi)" \
+	    "$abi_ldflags($abi) -e 0" "" \
+	    "$abi_asflags($abi) -mpdr" \
+	    [list sections.s] \
+	    [list "readelf -WS sections-2-${abi}${tmips}${ps2}.rd"] \
+	    "sections-2-${abi}"]]
+}
Index: binutils-gdb/ld/testsuite/ld-mips-elf/pie-n64.d
===================================================================
--- binutils-gdb.orig/ld/testsuite/ld-mips-elf/pie-n64.d
+++ binutils-gdb/ld/testsuite/ld-mips-elf/pie-n64.d
@@ -2,16 +2,16 @@
 #ld: -pie
 #readelf: -d
 
-Dynamic section at offset 0x208 contains 17 entries:
+Dynamic section at offset 0x220 contains 17 entries:
   Tag * Type * Name/Value
- 0x0+00000004 \(HASH\) * 0x368
- 0x0+00000005 \(STRTAB\) * 0x3c8
- 0x0+00000006 \(SYMTAB\) * 0x380
+ 0x0+00000004 \(HASH\) * 0x380
+ 0x0+00000005 \(STRTAB\) * 0x3e0
+ 0x0+00000006 \(SYMTAB\) * 0x398
  0x0+0000000a \(STRSZ\) * 28 \(bytes\)
  0x0+0000000b \(SYMENT\) * 24 \(bytes\)
- 0x0+70000035 \(MIPS_RLD_MAP_REL\) * 0x101c8
+ 0x0+70000035 \(MIPS_RLD_MAP_REL\) * 0x101a0
  0x0+00000015 \(DEBUG\) * 0x0
- 0x0+00000003 \(PLTGOT\) * 0x10430
+ 0x0+00000003 \(PLTGOT\) * 0x10420
  0x0+70000001 \(MIPS_RLD_VERSION\) * 1
  0x0+70000005 \(MIPS_FLAGS\) * NOTPOT
  0x0+70000006 \(MIPS_BASE_ADDRESS\) * 0x0
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n32.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n32.rd
@@ -0,0 +1,36 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.pdr +PROGBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.gptab\.sbss +MIPS_GPTAB .*
+  \[..\] \.gptab\.sdata +MIPS_GPTAB .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n32p.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n32p.rd
@@ -0,0 +1,36 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.pdr +PROGBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.gptab\.sdata +MIPS_GPTAB .*
+  \[..\] \.gptab\.sbss +MIPS_GPTAB .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n32t.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n32t.rd
@@ -0,0 +1,36 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.pdr +PROGBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.gptab\.sdata +MIPS_GPTAB .*
+  \[..\] \.gptab\.sbss +MIPS_GPTAB .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n64.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n64.rd
@@ -0,0 +1,36 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.MIPS\.options +MIPS_OPTIONS .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.pdr +PROGBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.gptab\.sbss +MIPS_GPTAB .*
+  \[..\] \.gptab\.sdata +MIPS_GPTAB .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n64t.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-n64t.rd
@@ -0,0 +1,36 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.MIPS\.options +MIPS_OPTIONS .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.pdr +PROGBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.gptab\.sdata +MIPS_GPTAB .*
+  \[..\] \.gptab\.sbss +MIPS_GPTAB .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-o32.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-o32.rd
@@ -0,0 +1,36 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.pdr +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.gptab\.sdata +MIPS_GPTAB .*
+  \[..\] \.gptab\.sbss +MIPS_GPTAB .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-o32t.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-1-o32t.rd
@@ -0,0 +1,36 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.pdr +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.gptab\.sdata +MIPS_GPTAB .*
+  \[..\] \.gptab\.sbss +MIPS_GPTAB .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n32.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n32.rd
@@ -0,0 +1,33 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n32p.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n32p.rd
@@ -0,0 +1,33 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n32t.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n32t.rd
@@ -0,0 +1,33 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n64.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n64.rd
@@ -0,0 +1,33 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.MIPS\.options +MIPS_OPTIONS .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n64t.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-n64t.rd
@@ -0,0 +1,33 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.MIPS\.options +MIPS_OPTIONS .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-o32.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-o32.rd
@@ -0,0 +1,33 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-o32t.rd
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections-2-o32t.rd
@@ -0,0 +1,33 @@
+There are [0-9]+ section headers, starting at offset 0x[0-9a-f]+:
+
+Section Headers:
+  \[Nr\] Name +Type .*
+  \[..\]  +NULL .*
+  \[..\] \.interp +PROGBITS .*
+  \[..\] \.MIPS\.abiflags +MIPS_ABIFLAGS .*
+  \[..\] \.reginfo +MIPS_REGINFO .*
+  \[..\] \.MIPS\.xhash +MIPS_XHASH .*
+  \[..\] \.text +PROGBITS .*
+  \[..\] \.rodata +PROGBITS .*
+  \[..\] \.got\.plt +PROGBITS .*
+  \[..\] \.data +PROGBITS .*
+  \[..\] \.got +PROGBITS .*
+  \[..\] \.sdata +PROGBITS .*
+  \[..\] \.lit8 +PROGBITS .*
+  \[..\] \.lit4 +PROGBITS .*
+  \[..\] \.sbss +NOBITS .*
+  \[..\] \.bss +NOBITS .*
+  \[..\] \.gnu\.attributes +GNU_ATTRIBUTES .*
+  \[..\] \.mdebug\.abi32 +PROGBITS .*
+  \[..\] \.mdebug\.abiN32 +PROGBITS .*
+  \[..\] \.mdebug\.abi64 +PROGBITS .*
+  \[..\] \.mdebug\.abiO64 +PROGBITS .*
+  \[..\] \.mdebug\.eabi32 +PROGBITS .*
+  \[..\] \.mdebug\.eabi64 +PROGBITS .*
+  \[..\] \.gcc_compiled_long32 +PROGBITS .*
+  \[..\] \.gcc_compiled_long64 +PROGBITS .*
+  \[..\] \.symtab +SYMTAB .*
+  \[..\] \.strtab +STRTAB .*
+  \[..\] \.shstrtab +STRTAB .*
+Key to Flags:
+#pass
Index: binutils-gdb/ld/testsuite/ld-mips-elf/sections.s
===================================================================
--- /dev/null
+++ binutils-gdb/ld/testsuite/ld-mips-elf/sections.s
@@ -0,0 +1,44 @@
+	.section .MIPS.xhash
+	.dc.l	0
+	.section .bss
+	.dc.l	0
+	.section .data
+	.dc.l	0
+	.section .gcc_compiled_long32
+	.dc.l	0
+	.section .gcc_compiled_long64
+	.dc.l	0
+	.section .got
+	.dc.l	0
+	.section .got.plt
+	.dc.l	0
+	.section .gptab.sbss
+	.dc.l	0
+	.section .gptab.sdata
+	.dc.l	0
+	.section .interp
+	.dc.l	0
+	.section .lit4
+	.dc.l	0
+	.section .lit8
+	.dc.l	0
+	.section .mdebug.abi32
+	.dc.l	0
+	.section .mdebug.abi64
+	.dc.l	0
+	.section .mdebug.abiN32
+	.dc.l	0
+	.section .mdebug.abiO64
+	.dc.l	0
+	.section .mdebug.eabi32
+	.dc.l	0
+	.section .mdebug.eabi64
+	.dc.l	0
+	.section .rodata
+	.dc.l	0
+	.section .sbss
+	.dc.l	0
+	.section .sdata
+	.dc.l	0
+	.section .text
+	.dc.l	0

  parent reply	other threads:[~2023-07-28  5:06 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-28  5:06 [committed 00/16] MIPS: Revert the change of `mipsisa64*-*-linux*' semantics Maciej W. Rozycki
2023-07-28  5:06 ` [committed 01/16] Revert "MIPS: support mips*64 as CPU and gnuabi64 as ABI" Maciej W. Rozycki
2023-07-28  5:06 ` Maciej W. Rozycki [this message]
2023-07-28  5:06 ` [committed 03/16] MIPS/GAS/testsuite: Disable compact EH #7 tests with OpenBSD targets Maciej W. Rozycki
2023-07-28  5:06 ` [committed 04/16] MIPS/LD/testsuite: Fix unaligned JALX failures " Maciej W. Rozycki
2023-07-28  5:06 ` [committed 05/16] MIPS/LD/testsuite: Fix JALR relaxation test failure with IRIX 6 Maciej W. Rozycki
2023-07-28  5:06 ` [committed 06/16] MIPS/LD/testsuite: Fix `attr-gnu-4-10' failures with IRIX targets Maciej W. Rozycki
2023-07-28  5:07 ` [committed 07/16] MIPS/LD/testsuite: Fix `attr-gnu-4-10' failures with OpenBSD targets Maciej W. Rozycki
2023-07-28  5:07 ` [committed 08/16] MIPS/LD/testsuite: Run `got-dump-1' for o32/n32 ABIs Maciej W. Rozycki
2023-07-28  5:07 ` [committed 09/16] MIPS/GAS/testsuite: Force o32 for tests expecting 32-bit addressing Maciej W. Rozycki
2023-07-28  5:07 ` [committed 10/16] MIPS/LD/testsuite: Fix MIPS16 interlinking test n64 regressions Maciej W. Rozycki
2023-07-28  5:07 ` [committed 11/16] MIPS/LD/testsuite: Fix MIPS16 interlinking test IRIX 6 regressions Maciej W. Rozycki
2023-07-28  5:07 ` [committed 12/16] testsuite: Also discard the `.MIPS.options' section Maciej W. Rozycki
2023-07-28  5:07 ` [committed 13/16] MIPS/testsuite: Handle 64-bit addresses Maciej W. Rozycki
2023-07-28  5:07 ` [committed 14/16] testsuite: Handle composed R_MIPS_NONE relocations Maciej W. Rozycki
2023-07-28  5:07 ` [committed 15/16] MIPS/GAS/testsuite: Fix n64 compact EH failures Maciej W. Rozycki
2023-07-28  5:07 ` [committed 16/16] MIPS: Support `-gnuabi64' target triplet suffix for 64-bit Linux targets Maciej W. Rozycki

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=alpine.DEB.2.21.2307271534140.10240@angie.orcam.me.uk \
    --to=macro@orcam.me.uk \
    --cc=binutils@sourceware.org \
    --cc=nickc@redhat.com \
    --cc=yunqiang.su@cipunited.com \
    /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).