This implementation of ELFDumper<ELFT>::printAttributes() in llvm-readobj has issues:
- It crashes when the content of the attribute section is empty.
- It uses unwrapOrError and reportWarning calls, though ideally we want to use reportUniqueWarning.
- It contains a TODO about redundant format version check.
lib/Support/ELFAttributeParser.cpp uses a hardcoded constant instead of the named constant.
This patch fixes all these issues.
I'm not sure you need the "the content of" bit of this message. The section itself is the thing that is empty/not empty.