mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-27 04:52:05 +08:00
bc27bb0573
On RELA targets the addend can affect JALX target's alignment, so only verify it once the whole relocation calculation has completed. bfd/ * elfxx-mips.c (mips_elf_calculate_relocation) <R_MIPS16_26> <R_MIPS_26, R_MICROMIPS_26_S1>: Include the addend in JALX's target alignment verification. ld/ * testsuite/ld-mips-elf/unaligned-jalx-addend-0.d: New test. * testsuite/ld-mips-elf/unaligned-jalx-addend-1.d: New test. * testsuite/ld-mips-elf/unaligned-jalx-addend-mips16-0.d: New test. * testsuite/ld-mips-elf/unaligned-jalx-addend-mips16-1.d: New test. * testsuite/ld-mips-elf/unaligned-jalx-addend-micromips-0.d: New test. * testsuite/ld-mips-elf/unaligned-jalx-addend-micromips-1.d: New test. * testsuite/ld-mips-elf/unaligned-jalx-addend-0.s: New test source. * testsuite/ld-mips-elf/unaligned-jalx-addend-1.s: New test source. * testsuite/ld-mips-elf/mips-elf.exp: Run the new tests.
28 lines
705 B
Makefile
28 lines
705 B
Makefile
#name: MIPS16 JALX to unaligned symbol with addend 0
|
|
#source: unaligned-jalx-addend-0.s -mips16
|
|
#source: unaligned-insn.s
|
|
#as: -EB -n32 -march=from-abi
|
|
#ld: -EB -Ttext 0x1c000000 -e 0x1c000000
|
|
#objdump: -dr --prefix-addresses --show-raw-insn
|
|
|
|
.*: +file format .*mips.*
|
|
|
|
Disassembly of section \.text:
|
|
[0-9a-f]+ <[^>]*> 1c18 000d jalx 1c000034 <bar2>
|
|
[0-9a-f]+ <[^>]*> 6500 nop
|
|
[0-9a-f]+ <[^>]*> 1c18 000c jalx 1c000030 <bar0>
|
|
[0-9a-f]+ <[^>]*> 6500 nop
|
|
[0-9a-f]+ <[^>]*> 1c18 000c jalx 1c000030 <bar0>
|
|
[0-9a-f]+ <[^>]*> 6500 nop
|
|
[0-9a-f]+ <[^>]*> 1c18 000e jalx 1c000038 <bar4>
|
|
[0-9a-f]+ <[^>]*> 6500 nop
|
|
\.\.\.
|
|
\.\.\.
|
|
\.\.\.
|
|
\.\.\.
|
|
\.\.\.
|
|
\.\.\.
|
|
\.\.\.
|
|
\.\.\.
|
|
\.\.\.
|