This change adds a bunch of options that GNU readelf supports. There is one breaking change when invoked as llvm-readobj, and three breaking changes when invoked as llvm-readelf:
- Add --all (implies --file-header, --program-headers, etc.)
- [Breaking] -a is --all instead of --arm-attributes
- Add --file-header as an alias for --file-headers
- Replace --sections with --sections-headers, keeping --sections as an alias for it
- Add --relocs as an alias for --relocations
- Add --dynamic as an alias for --dynamic-table
- Add --segments as an alias for --program-headers
- Add --section-groups as an alias for --elf-section-groups
- Add --dyn-syms as an alias for --dyn-symbols
- Add --syms as an alias for --symbols
- Add --histogram as an alias for --elf-hash-histogram
- [Breaking] When invoked as llvm-readelf, -s is --symbols instead of --sections
- [Breaking] When invoked as llvm-readelf, -t is no longer an alias for --symbols
Since -s should be an alias for --sections, maybe it's worth piping the -s output to a file and then comparing the output against --sections output.
Similar comment below for --symbols.
I assume we have sufficient separate testing for --symbols and --sections, so we can rely on those to show that we dump sections and symbols output correctly with the long-form switches. If we don't, we should add them.