[PATCH] D133030: [AIX] llvm-readobj support a new option --exception-section for xcoff object file.
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Sep 15 00:38:14 PDT 2022
jhenderson added inline comments.
================
Comment at: llvm/lib/Object/XCOFFObjectFile.cpp:454
+ if (Error E = Binary::checkOffset(Data, SectionStart, SizeOfSection)) {
+ SmallString<256> UnknownType;
+ Twine(("Unknown SectType(") + Twine(SectType) +")").toVector(UnknownType);
----------------
`256` is unnecessarily large, given the maximum possible size of any of these names. Reduce it so that the typical max size is the maximum size of one of the normal cases.
================
Comment at: llvm/lib/Object/XCOFFObjectFile.cpp:455
+ SmallString<256> UnknownType;
+ Twine(("Unknown SectType(") + Twine(SectType) +")").toVector(UnknownType);
+ const char *SectionName = UnknownType.c_str();
----------------
The `<unknown:0x1234>` style is used in other places, so I think it's reasonable to use it here. On ELF, we use hex numbers for the section type too. You may wish to do that here too.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D133030/new/
https://reviews.llvm.org/D133030
More information about the llvm-commits
mailing list