-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
MIPS/LD: Include n64 `.interp' with INITIAL_READONLY_SECTIONS
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 5a8e7be ("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 94bb04b ("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 <[email protected]> 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.
- Loading branch information
1 parent
cc66ad2
commit f625926
Showing
18 changed files
with
559 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 |
Oops, something went wrong.