[llvm-readelf/obj] - Stop printing invalid names for unnamed section symbols.
We have an issue with `ELFDumper<ELFT>::getSymbolSectionName`: 1) It is used deeply for both LLVM/GNU styles and might return LLVM-style only values to describe symbols: "Undefined", "Processor Specific", "Absolute", etc. 2) `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. It also adds a meaningful new warning that is reported when we are unable to get a section index for a section symbol. Differential revision: https://reviews.llvm.org/D87764
Loading
Please sign in to comment