mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-15 04:31:49 +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
695 B
Makefile
28 lines
695 B
Makefile
#name: MIPS JALX to unaligned symbol with addend 0
|
|
#source: unaligned-jalx-addend-0.s
|
|
#source: unaligned-insn.s -mips16
|
|
#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]+ <[^>]*> 7700000d jalx 1c000034 <bar2>
|
|
[0-9a-f]+ <[^>]*> 00000000 nop
|
|
[0-9a-f]+ <[^>]*> 7700000c jalx 1c000030 <bar0>
|
|
[0-9a-f]+ <[^>]*> 00000000 nop
|
|
[0-9a-f]+ <[^>]*> 7700000c jalx 1c000030 <bar0>
|
|
[0-9a-f]+ <[^>]*> 00000000 nop
|
|
[0-9a-f]+ <[^>]*> 7700000e jalx 1c000038 <bar4>
|
|
[0-9a-f]+ <[^>]*> 00000000 nop
|
|
\.\.\.
|
|
\.\.\.
|
|
\.\.\.
|
|
\.\.\.
|
|
\.\.\.
|
|
\.\.\.
|
|
\.\.\.
|
|
\.\.\.
|
|
\.\.\.
|