Fixes https://bugs.llvm.org/show_bug.cgi?id=41713.
For type values that do not have proper names, print reasonable representation in llvm-nm, llvm-readobj and llvm-readelf, matching GNU tools.
Differential D65537
Print reasonable representations of type names in llvm-nm, readelf and readobj. Sunil_Srivastava on Jul 31 2019, 1:38 PM. Authored by
Details Fixes https://bugs.llvm.org/show_bug.cgi?id=41713. For type values that do not have proper names, print reasonable representation in llvm-nm, llvm-readobj and llvm-readelf, matching GNU tools.
Diff Detail
Event TimelineComment Actions I've added a few more reviewers who I know have been working on the GNU binutils recently.
Comment Actions Well, my main concern is about ElfSymbolTypes array values representation.
Comment Actions I tested the output with the change I suggested and it was: Name Value Class Type Size Line Section os_specific_10 | | U | IFUNC| | |*UND* os_specific_11 | | U | <OS specific>(11)| | |*UND* os_specific_12 | | U | <OS specific>(12)| | |*UND* proc_specific_13 | | U |<processor specific>(13)| | |*UND* proc_specific_14 | | U |<processor specific>(14)| | |*UND* proc_specific_15 | | U |<processor specific>(15)| | |*UND* symbol_common | | U | COMMON| | |*COM* symbol_file | | U | FILE| | |*UND* symbol_func | | U | FUNC| | |*UND* symbol_ifunc | | U | IFUNC| | |*UND* symbol_notype | | U | NOTYPE| | |*UND* symbol_obj | | U | OBJECT| | |*UND* symbol_tls | | U | TLS| | |*UND* unknown_7 | | U | <unknown>(7)| | |*UND* unknown_8 | | U | <unknown>(8)| | |*UND* unknown_9 | | U | <unknown>(9)| Looks good to me, though I do not really mind to keep the original output probably. Comment Actions The output for llvm-readelf should be identical to what GNU readelf prints, which is what the patch proposes. I'm happy with other options for the LLVM output. @grimar's suggestion here sounds good to me, though I'd suggest adding a space: Unknown (7).
Comment Actions
Okay. Please make the changes suggested inline re. ordering and formatting of the output ("Unknown (7)" or possibly "Unknown (0x7)" seems reasonable to me).
|