There were a number of issues with the llvm-readobj documentation. The following points were raised in https://bugs.llvm.org/show_bug.cgi?id=42255, and have been fixed in this patch:
- The description section claimed "The tool and its output is primarily designed for use in FileCheck-based tests" which is not really the case any more.
- The documentation used single-dash long options for option names, but references in the help text to other options exclusively used double-dashes. Fixed by standardising on double-dashes for all long-form options.
- The majority of options available and in the help text were not present in the documentation. This patch adds them.
- Several aliases, both long and short, were missing, e.g. --relocs.
Additionally, this patch improves the documentation by:
- Splitting the options into categories based on the file format they are specific to.
- Updating the Exit Status section to correctly mention that errors lead to a non-zero exit code.
- Adding a See Also section referencing other similar LLVM tools.
- Improving/correcting some of the descriptions of options that did not quite match up with what llvm-readobj does.
It might be worth being less specific about what --all does due to the likelihood of it getting out of date as new options are added? I suspect that people wanting --all are those that want to dump all output to a text file in order to search interactively rather than need to know exactly what it does in order to parse it. Perhaps something like "Equivalent to adding the major output format options that are relevant to the file format."
I've not a strong opinion here, so feel free to ignore.