Bug 24702 - objdump: use STT_SECTION symbol in the symbolizer
Summary: objdump: use STT_SECTION symbol in the symbolizer
Alias: None
Product: binutils
Classification: Unclassified
Component: binutils (show other bugs)
Version: 2.33 (HEAD)
: P2 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
Depends on:
Reported: 2019-06-19 03:32 UTC by Fangrui Song
Modified: 2019-06-21 21:33 UTC (History)
1 user (show)

See Also:
Last reconfirmed:


Note You need to log in before you can comment on or make changes to this bug.
Description Fangrui Song 2019-06-19 03:32:20 UTC
STT_SECTION symbols are not used to symbolize addresses in objdump -d output, but that will be useful when the relevant symbols are missing.

e.g. In a typical disassembly listing of the .plt section in an x86-64 program:

Disassembly of section .plt:

00000000002011f0 <printf@plt-0x10>:
                  ^^^^^^^^ it would be nice to symbolize this as: .plt
  2011f0:       ff 35 22 1e 00 00       pushq  0x1e22(%rip)        # 203018 <__TMC_END__+0x8>
  2011f6:       ff 25 24 1e 00 00       jmpq   *0x1e24(%rip)        # 203020 <__TMC_END__+0x10>
  2011fc:       0f 1f 40 00             nopl   0x0(%rax)

0000000000201200 <printf@plt>:
  201200:       ff 25 22 1e 00 00       jmpq   *0x1e22(%rip)        # 203028 <printf@GLIBC_2.2.5>
  201206:       68 00 00 00 00          pushq  $0x0
  20120b:       e9 e0 ff ff ff          jmpq   2011f0 <_fini+0x14>
                                                       ^^^^ if there is a symbol with a greater address than .plt, this may be symbolized as: foo-0x34
                                                       ^^^^ In any case, jmpq 2011f0 <.plt> will look better