mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-09 04:21:49 +08:00
c3f72de4f5
This adds some annotation to Power10 pcrel instructions, displaying the target address (ie. pc + D34 field) plus a symbol if there is one at exactly that target address. pld from the .got or .plt will also look up the entry and display it, symbolically if there is a dynamic relocation on the entry. include/ * dis-asm.h (struct disassemble_info): Add dynrelbuf and dynrelcount. binutils/ * objdump.c (struct objdump_disasm_info): Delete dynrelbuf and dynrelcount. (find_symbol_for_address): Adjust for dynrelbuf and dynrelcount move. (disassemble_section, disassemble_data): Likewise. opcodes/ * ppc-dis.c (struct dis_private): Add "special". (POWERPC_DIALECT): Delete. Replace uses with.. (private_data): ..this. New inline function. (disassemble_init_powerpc): Init "special" names. (skip_optional_operands): Add is_pcrel arg, set when detecting R field of prefix instructions. (bsearch_reloc, print_got_plt): New functions. (print_insn_powerpc): For pcrel instructions, print target address and symbol if known, and decode plt and got loads too. gas/ * testsuite/gas/ppc/prefix-pcrel.d: Update expected output. * testsuite/gas/ppc/prefix-reloc.d: Likewise. * gas/testsuite/gas/ppc/vsx_32byte.d: Likewise. ld/ * testsuite/ld-powerpc/inlinepcrel-1.d: Update expected output. * testsuite/ld-powerpc/inlinepcrel-2.d: Likewise. * testsuite/ld-powerpc/notoc2.d: Likewise. * testsuite/ld-powerpc/notoc3.d: Likewise. * testsuite/ld-powerpc/pcrelopt.d: Likewise. * testsuite/ld-powerpc/startstop.d: Likewise. * testsuite/ld-powerpc/tlsget.d: Likewise. * testsuite/ld-powerpc/tlsget2.d: Likewise. * testsuite/ld-powerpc/tlsld.d: Likewise. * testsuite/ld-powerpc/weak1.d: Likewise. * testsuite/ld-powerpc/weak1so.d: Likewise.
30 lines
880 B
Makefile
30 lines
880 B
Makefile
#source: notoc2.s
|
|
#as: -a64 -mpower10
|
|
#ld: -shared -z norelro
|
|
#objdump: -d -Mpower10
|
|
#target: powerpc64*-*-*
|
|
|
|
.*
|
|
|
|
Disassembly of section \.text:
|
|
|
|
.* <.*\.plt_call\.puts>:
|
|
.*: (04 10 00 01|01 00 10 04) pld r12,66200 # 10418 \[puts@plt\]
|
|
.*: (e5 80 02 98|98 02 80 e5)
|
|
.*: (7d 89 03 a6|a6 03 89 7d) mtctr r12
|
|
.*: (4e 80 04 20|20 04 80 4e) bctr
|
|
#...
|
|
.*: (04 13 ff ff|ff ff 13 04) pld r12,-1 # 1bf
|
|
.*: (e5 80 ff ff|ff ff 80 e5)
|
|
.*: (04 10 00 00|00 00 10 04) pld r12,0 # 1c8
|
|
.*: (e5 80 00 00|00 00 80 e5)
|
|
.*: (06 13 ff ff|ff ff 13 06) pla r12,-1 # 1cf
|
|
.*: (39 80 ff ff|ff ff 80 39)
|
|
.*: (06 10 00 00|00 00 10 06) pla r12,0 # 1d8
|
|
.*: (39 80 00 00|00 00 80 39)
|
|
.*: (06 10 00 00|00 00 10 06) pla r3,88 # 238 <hello>
|
|
.*: (38 60 00 58|58 00 60 38)
|
|
.*: (4b ff ff 99|99 ff ff 4b) bl .* <.*\.plt_call\.puts>
|
|
.*: (60 00 00 00|00 00 00 60) nop
|
|
#pass
|