objdump --no-addresses

I find this useful when needing to compare compiler output, where the
address of the instruction and the value of symbols results in
unwanted differences.

	* objdump.c (no_addresses): New static var.
	(usage): Print help for --no-addresses.
	(long_options): Add --no-addresses entry.
	(objdump_print_addr_with_sym, objdump_print_addr): Omit symbol address.
	(disassemble_bytes): Don't print current line address, or reloc
	address.
	* doc/binutils.texi: Document objdump --no-addresses.
This commit is contained in:
Alan Modra 2020-04-15 19:26:55 +09:30
parent 7ecb51549a
commit b1bc1394df
3 changed files with 54 additions and 18 deletions

View file

@ -2161,6 +2161,7 @@ objdump [@option{-a}|@option{--archive-headers}]
[@option{-w}|@option{--wide}]
[@option{--start-address=}@var{address}]
[@option{--stop-address=}@var{address}]
[@option{--no-addresses}]
[@option{--prefix-addresses}]
[@option{--[no-]show-raw-insn}]
[@option{--adjust-vma=}@var{offset}]
@ -2314,6 +2315,10 @@ Note if the @option{--dwarf=follow-links} option has also been enabled
then any symbol tables in linked debug info files will be read in and
used when disassembling.
@item --no-addresses
When disassembling, don't print addresses on each line or for symbols
and relocation offsets.
@item --prefix-addresses
When disassembling, print the complete address on each line. This is
the older disassembly format.