aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.h
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2024-04-02 07:18:19 +1030
committerAlan Modra <amodra@gmail.com>2024-04-02 10:32:04 +1030
commitf37f8c46c2e876a524301d6916a04cf7debb6483 (patch)
tree2db867fc4a086aac2d325d3729ed8904168466fd /bfd/elfxx-mips.h
parent0ed1e396e4e869970c60d445bf606ed5092f5558 (diff)
downloadfsf-binutils-gdb-f37f8c46c2e876a524301d6916a04cf7debb6483.zip
fsf-binutils-gdb-f37f8c46c2e876a524301d6916a04cf7debb6483.tar.gz
fsf-binutils-gdb-f37f8c46c2e876a524301d6916a04cf7debb6483.tar.bz2
objdump --disassemble=sym peculiarities
Given this testcase: .text mov $x1,%eax f1: mov $f1,%eax .type f1,@function .size f1,.-f1 mov $x2,%eax f2: mov $f2,%eax .type f2,@function .size f2,.-f2+0x1000 #bad size objdump --reloc --disassemble=f1 prints 00000000 <f1-0x5>: 0: b8 00 00 00 00 mov $0x0,%eax and objdump --reloc --disassemble=f2 prints 0000000f <f2>: f: b8 0f 00 00 00 mov $0xf,%eax 10: R_386_32 .text It seems for f1 we get the insn before f1 and no reloc whereas, post 159daa36fa, f2 is disassembled correctly. Some analysis says that find_symbol_for_address may return a symbol past the current address, and reloc skipping is broken. Fix both of these problems. * objdump.c (disassemble_jumps, disassemble_bytes): Replace relppp with relpp, ie. don't update caller's rel_pp. Adjust calls. (disassemble_section): Skip over relocs inside loop rather than before loop. Revert 7e538762c2c1. If given a symbol, don't start disassembling until its address is reached. Correct end of function calculation.
Diffstat (limited to 'bfd/elfxx-mips.h')
0 files changed, 0 insertions, 0 deletions