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: unassignedb...@nondot.org
Reporter: saugust...@google.com
CC: llvm-bugs@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",@progbits
.global foo
foo:
call foo@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@plt>
Disassembly of section .plt:
0000000000001010 <foo@plt-0x10>:
1010: ff 35 f2 0f 00 00 pushq 0xff2(%rip) # 2008
<foo@plt+0xfe8>
1016: ff 25 f4 0f 00 00 jmpq *0xff4(%rip) # 2010
<foo@plt+0xff0>
101c: 0f 1f 40 00 nopl 0x0(%rax)
0000000000001020 <foo@plt>:
1020: ff 25 f2 0f 00 00 jmpq *0xff2(%rip) # 2018
<foo@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs