[llvm-bugs] [Bug 37383] New: llvm-objdump prints garbage for absolute symbol values
via llvm-bugs
llvm-bugs at lists.llvm.org
Tue May 8 14:26:35 PDT 2018
https://bugs.llvm.org/show_bug.cgi?id=37383
Bug ID: 37383
Summary: llvm-objdump prints garbage for absolute symbol values
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: echristo at gmail.com, llvm-bugs at lists.llvm.org
For the simple reproducer below, compare the output of llvm-objdump to the
output of binutils objdump. Both report the same raw bytes for the callq
instruction, but the objdump version has both the correct symbol value and a
nice symbol name.
Steps to reproduce:
$ pwd
~/llvm-svn/build
$ cat t.s
.text
callq foo
$ ./bin/llvm-mc t.s -o t.o -filetype=obj -triple=x86_64-unknown-linux
$ ./bin/ld.lld t.o --defsym foo=0x100
$ ./bin/llvm-objdump -disassemble a.out
...
201000: e8 fb f0 df ff callq -2100997
$ objdump -d a.out
...
201000: e8 fb f0 df ff callq 100 <foo>
Actually, the llvm-objdump version is probably reporting the right value for
one of the many displacement encodings possible for this instruction, but it is
very hard to tell if it is a correct value without digging into binutils
objdump or the isa manual.
--
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/20180508/168d6cc3/attachment.html>
More information about the llvm-bugs
mailing list