binutils-gdb/ld/testsuite/ld-powerpc/weak1.d
Alan Modra c3f72de4f5 PowerPC disassembly of pcrel references
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.
2021-04-09 16:56:43 +09:30

27 lines
1.1 KiB
Makefile

.*: file format .*
Disassembly of section \.text:
.*0c0 <_start>:
.*0c0: (04 10 00 01|01 00 10 04) pld r3,65888 # 10010220 \[0@got\]
.*0c4: (e4 60 01 60|60 01 60 e4)
.*0c8: (04 10 00 01|01 00 10 04) pld r3,65856 # 10010208 \[0@got\]
.*0cc: (e4 60 01 40|40 01 60 e4)
.*0d0: (04 10 00 01|01 00 10 04) pld r3,65864 # 10010218 \[0@got\]
.*0d4: (e4 60 01 48|48 01 60 e4)
.*0d8: (04 10 00 01|01 00 10 04) pld r3,65848 # 10010210 \[0@got\]
.*0dc: (e4 60 01 38|38 01 60 e4)
.*0e0: (e8 62 80 20|20 80 62 e8) ld r3,-32736\(r2\)
.*0e4: (e8 62 80 08|08 80 62 e8) ld r3,-32760\(r2\)
.*0e8: (e8 62 80 18|18 80 62 e8) ld r3,-32744\(r2\)
.*0ec: (e8 62 80 10|10 80 62 e8) ld r3,-32752\(r2\)
.*0f0: (60 00 00 00|00 00 00 60) nop
.*0f4: (e8 62 80 20|20 80 62 e8) ld r3,-32736\(r2\)
.*0f8: (60 00 00 00|00 00 00 60) nop
.*0fc: (e8 62 80 08|08 80 62 e8) ld r3,-32760\(r2\)
.*100: (60 00 00 00|00 00 00 60) nop
.*104: (e8 62 80 18|18 80 62 e8) ld r3,-32744\(r2\)
.*108: (60 00 00 00|00 00 00 60) nop
.*10c: (e8 62 80 10|10 80 62 e8) ld r3,-32752\(r2\)