[llvm-dev] RFC: Two llvm-readobj behaviour queries

Michael Spencer via llvm-dev llvm-dev at lists.llvm.org
Tue Jun 25 17:35:02 PDT 2019

On Mon, Jun 24, 2019 at 8:16 AM James Henderson via llvm-dev <
llvm-dev at lists.llvm.org> wrote:

> Hi all,
> I just was discussing a couple of features in llvm-readobj and whether we
> should change them slightly:
> 1) llvm-readobj --all currently matches GNU readelf's --all switch in that
> it is equivalent to specifying a bundle of different options (including
> --file-headers, --program-headers, --symbols, --version-info etc). However,
> --all does not actually specify "all" dump types. For example, it doesn't
> dump ELF section groups or the addrsig section (--elf-section-groups and
> --addrsig respectively). I'd propose that it should dump all relevant
> dumping information. Ideally, I'd suggest this difference for both
> llvm-readobj and llvm-readelf, but I can understand nervousness in the
> additional dumps that this would produce in llvm-readelf versus GNU readelf.
> 2) llvm-readobj --notes prints the SHT_NOTE sections unless the ELF type
> is ET_CORE, in which case it prints the contents of the PT_NOTE segments
> and NOT the SHT_NOTE sections. It seems to me like there's no good reason
> to not try both for all file formats. For example, it's perfectly
> reasonable to have PT_NOTE segments in an ET_EXEC or ET_DYN object file.
> What would people think about removing this distinction? In this case, I'd
> propose printing all PT_NOTE segments and all SHT_NOTE sections not in
> PT_NOTE segments. In all likelihood, this would produce no different
> behaviour to the old behaviour.
> Thoughts?
> James
I'm fine with both changes.

For the first, I prefer llvm-readelf --all mimics gnu readelf.

- Michael Spencer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190625/25859f57/attachment.html>

More information about the llvm-dev mailing list