We have an issue with ELFDumper<ELFT>::getSymbolSectionName:
- It is used deeply for both LLVM/GNU styles and might return LLVM-style only values to describe symbols: "Undefined", "Processor Specific", "Absolute", etc.
- getSymbolSectionName is used by getFullSymbolName and these special values might appear instead of symbol names in many places. This occurs for unnamed section symbols currently.
This patch extracts the LLVM specific logic to LLVMStyle<ELFT>::printSymbolSection,
which seems to be the only place where we want to print the special values mentioned.
Depends on D87763
Am I right in thinking these warnings are coming out because SHN_ABS isn't a valid section index? That doesn't seem right to me - a st_shndx of SHN_ABS is perfectly normal. You just wouldn't normally have a section symbol to them. What happens if there are many sections and section index 65521 is actually a valid section?
I'd be inclined to produce a warning saying "section symbols shouldn't be absolute" (or whatever), and then print <?>, in this case.