[PATCH] D82858: [llvm-objdump] Detect note section for ELF objects

Ronak Chauhan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Jun 30 04:51:09 PDT 2020


rochauha added a comment.

In D82858#2122431 <https://reviews.llvm.org/D82858#2122431>, @jhenderson wrote:

> Could you more clearly clarify what the motivation here is? Is this working towards some missing GNU compatibility or similar? If so, could you paste an example of what GNU objdump produces, please.
>
> Note that .note sections can be dumped using llvm-readelf in GNU style, just not as part of the disassembly.


GNU compatibility is not a goal here. The idea is to support disassembling everything that appears in a binary. Right now almost every entity is disassembled as instructions (even notes). This is not very helpful to the user.

Let us consider the example of notes. A user has to use llvm-readobj to look at notes and then use llvm-objdump to look at instructions. There is //some// overlap between the functionality llvm-readobj and llvm-objdump as well. For example, both also support only looking at symbols. I guess this divide between both tools is not necessary.

llvm-objdump is more 'feature rich' in the sense that it allows to look at target specific parts of the code as well. Right now the plan is to add some of the missing functionality to llvm-objdump. The final goal would be to support re-assemblable disassembly after we are able to disassemble all contents of a binary.

At the time of writing, no mainstream tool supports re-assemblable disassembly. The ones which do are mostly proprietary.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82858/new/

https://reviews.llvm.org/D82858





More information about the llvm-commits mailing list