via llvm-dev
2019-Jun-24 19:33 UTC
[llvm-dev] RFC: Use section name or <first-symbol>-<offset> as the section start symbol
Hello,
Since `llvm-objdump –disassemble` is performed symbol by symbol, when
dissembling a section that don’t have a symbol at its start address, we need to
figure out a proxy symbol name for the address. `.plt` is a typical case where
entry zero has no symbol. Currently llvm-objdump choose to use section name as
the proxy symbol across all targets for all sections (including special section
like .plt etc.) whereas GNU objdump uses “<first-symbol>-<offset>”.
I submitted a patch to improve the compatibility with GNU.
Before the patch:
.plt:
...
bar2 at plt:
...
jmp -32 <.plt>
after the patch:
bar2 at plt-0x10:
...
bar2 at plt:
...
jmp -32 <bar2 at plt-0x10>
Fangrui and Peter think the code looks verbose and not aesthetically appealing,
suggested we not to adopt GNU behaviour. For disassembly, do we want to exactly
match the output of GNU objdump, if there are possible improvements?
https://reviews.llvm.org/D63280
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
<http://lists.llvm.org/pipermail/llvm-dev/attachments/20190624/a3870a40/attachment.html>