[llvm-dev] RFC: llvm-readelf Mach-O & COFF options

Alex Brachet-Mialot via llvm-dev llvm-dev at lists.llvm.org
Fri Jun 28 23:28:18 PDT 2019


My personal preference is that llvm-readelf only show the elf related
options with -help and show all with -help-hidden. There is support for
this in CommandLine.h, but I don't know how tricky it gets when we don't
want them to be hidden for llvm-readobj. I haven't looked into this fully.

For some reference, I have compiled how the other alias tools are handled.
Many of these are aliases to llvm-ar, it is helpful to know that llvm-ar
doesn't use CommandLine.h to parse its options.

llvm-addr2line -> llvm-symbolizer: help is the same, docs mention it is an
alias and only note the differences between it and llvm-symbolizer.
llvm-dlltool -> llvm-ar: help is different and -help-hidden changes
nothing. I couldn't find docs for llvm-dlltool.
llvm-lib -> llvm-ar: *no* help option for llvm-lib. The docs don't even
have a see also for ar.
llvm-ranlib -> llvm-ar: help is different. Docs mention it is an alias and
note the differences.
llvm-strip -> llvm-objcopy: help is slightly different. Docs do not mention
it is an alias.

The lack of a pattern makes some sense given different tools will have
different requirements. Perhaps a useless widening of the scope of your
question then. But back to your question, I personally think that a man
page has the room to include _hidden_ options and don't see any benefit in
excluding them. I also think it makes sense to mention it is an alias in
the man page because it is a little curious otherwise why something called
readelf has so many options for non elf files, in my opinion.

Best,
Alex
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20190629/bcc044c5/attachment.html>


More information about the llvm-dev mailing list