mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-03 04:12:10 +08:00
f625926792
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 commit5a8e7be242
("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 commit94bb04b3c6
("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.
24 lines
741 B
Makefile
24 lines
741 B
Makefile
#source: pie.s
|
|
#ld: -pie
|
|
#readelf: -d
|
|
|
|
Dynamic section at offset 0x220 contains 17 entries:
|
|
Tag * Type * Name/Value
|
|
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\) * 0x101a0
|
|
0x0+00000015 \(DEBUG\) * 0x0
|
|
0x0+00000003 \(PLTGOT\) * 0x10420
|
|
0x0+70000001 \(MIPS_RLD_VERSION\) * 1
|
|
0x0+70000005 \(MIPS_FLAGS\) * NOTPOT
|
|
0x0+70000006 \(MIPS_BASE_ADDRESS\) * 0x0
|
|
0x0+7000000a \(MIPS_LOCAL_GOTNO\) * 2
|
|
0x0+70000011 \(MIPS_SYMTABNO\) * 3
|
|
0x0+70000012 \(MIPS_UNREFEXTNO\) * 13
|
|
0x0+70000013 \(MIPS_GOTSYM\) * 0x3
|
|
0x0+6ffffffb \(FLAGS_1\) * Flags: PIE
|
|
0x0+00000000 \(NULL\) * 0x0
|