[llvm-dev] RFC: Two llvm-readobj behaviour queries
Peter Smith via llvm-dev
llvm-dev at lists.llvm.org
Mon Jun 24 09:01:43 PDT 2019
On Mon, 24 Jun 2019 at 16:16, 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.
I agree with both proposals. Although I suspect that people parsing
the output of GNU readelf won't be using the --all switch I think it
is reasonable to keep the option sets the same.
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
More information about the llvm-dev