llvm-objdump had some missing coverage that is fixed by this change:
- A test specifically for --print-imm-hex, and coverage of --no-print-imm-hex
- section-headers.test checks the aliases --headers or --section-headers
- A test for the use of --private-headers for ELF that checks the output
Add a comment to the start of the test briefly outlining the test purpose.
A quick skim suggests this is essentially the only testing for dumping this information for llvm-objdump for ELF. I'm guessing the code path is completely unrelated to the Mach-O equivalent behaviour, so it looks like it needs far more thorough testing, showing that all the various properties can be dumped correctly (e.g. all the different flags). Take a look at the equivalent llvm-readobj testing for an idea of what would be best.
Assuming more widespread testing is added, I'd split this up into separate testing for each of the different things (program header/version info/dynamic section) and then have a very minimal test that shows that --private-headers dumps all three.