gprofng: 30834 improve disassembly output for call and branch instructions
This patch makes the gprofng disassembler to emit, e.g.
call fprintf@plt [ 0x401060, .-0x49c]
instead of
call 0xfffffffffffffb64
I use bfd_get_synthetic_symtab() to get function names in the .plt section.
I have not yet modified Elf-reader in gprofng to remove parsing of .symtab or
.dynsym sections. But we plan to do it.
gprofng/ChangeLog
2023-09-20 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
PR gprofng/30834
* src/Disasm.cc: Show the function name in the call instruction
and the relative address in the branch instruction. Remove unused code.
* src/Disasm.h (map_PC_to_func, get_funcname_in_plt): New functions.
* src/Elf.cc: Get function names for the .plt section.
* src/Elf.h (get_funcname_in_plt, get_bfd_symbols): New functions.
* src/Stabs.cc: Add pltSym to SymLst. Remove the conversion to uint32_t.