The following patch introduces a new function printSectionMapping which is responsible for dumping just the section-to-segment mapping.
This patch also introduces a n option -section-mapping that outputs that mapping without the program headers.
Previously, this functionality was controlled by printProgramHeaders, and the output from -program-headers has not been changed. I am happy to change the option name, I copied the name that was displayed when outputting the mapping table.
I'm not sure you need this test case, as it is identical to the previous one essentially. llvm-readobj --elf-output-style=GNU and llvm-readelf are essentially identical (ignoring certain unrelated switch interpretations and aliases).