[llvm-bugs] [Bug 38186] New: llvm-objdump doesn't handle symbols referring the .plt section, or print symbols within it.
via llvm-bugs
llvm-bugs at lists.llvm.org
Mon Jul 16 15:31:28 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=38186
Bug ID: 38186
Summary: llvm-objdump doesn't handle symbols referring the .plt
section, or print symbols within it.
Product: tools
Version: trunk
Hardware: PC
OS: Linux
Status: NEW
Severity: enhancement
Priority: P
Component: llvm-objdump
Assignee: unassignedbugs at nondot.org
Reporter: saugustine at google.com
CC: llvm-bugs at lists.llvm.org
Without the symbols listed in the .plt section, it is hard to know exactly what
symbol is being called. In this example, the only thing that appears is an
offset at the call site, and no symbols at all inside the .plt section. Compare
this to gnu objdump.
$ cat t.s
.section .text,"ax", at progbits
.global foo
foo:
call foo at plt
$ ./bin/clang t.s -fpic -c
$ ./bin/ld.lld t.o -shared
$ ./bin/llvm-objdump -d a.out
a.out: file format ELF64-x86-64
Disassembly of section .text:
foo:
1000: e8 1b 00 00 00 callq 27
Disassembly of section .plt:
.plt:
1010: ff 35 f2 0f 00 00 pushq 4082(%rip)
1016: ff 25 f4 0f 00 00 jmpq *4084(%rip)
101c: 0f 1f 40 00 nopl (%rax)
1020: ff 25 f2 0f 00 00 jmpq *4082(%rip)
1026: 68 00 00 00 00 pushq $0
102b: e9 e0 ff ff ff jmp -32 <.plt>
Compare that to gnu's objdump:
$ objdump -d a.out
a.out: file format elf64-x86-64
Disassembly of section .text:
0000000000001000 <foo>:
1000: e8 1b 00 00 00 callq 1020 <foo at plt>
Disassembly of section .plt:
0000000000001010 <foo at plt-0x10>:
1010: ff 35 f2 0f 00 00 pushq 0xff2(%rip) # 2008
<foo at plt+0xfe8>
1016: ff 25 f4 0f 00 00 jmpq *0xff4(%rip) # 2010
<foo at plt+0xff0>
101c: 0f 1f 40 00 nopl 0x0(%rax)
0000000000001020 <foo at plt>:
1020: ff 25 f2 0f 00 00 jmpq *0xff2(%rip) # 2018
<foo at plt+0xff8>
1026: 68 00 00 00 00 pushq $0x0
102b: e9 e0 ff ff ff jmpq 1010 <foo+0x10>
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20180716/4c3c3e3f/attachment.html>
More information about the llvm-bugs
mailing list