[PATCH] D82955: [llvm-readelf] - Do not error out when dumping symbols.

George Rimar via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 2 06:25:37 PDT 2020


grimar marked an inline comment as done.
grimar added inline comments.


================
Comment at: llvm/test/tools/llvm-readobj/ELF/symbols.test:132
+# STRTAB-LINK-ERR-LLVM-NEXT: warning: '[[FILE]]': unable to get the string table for the SHT_SYMTAB section: invalid section index: 255
+# STRTAB-LINK-ERR-LLVM-NEXT: warning: '[[FILE]]': st_name (0x0) is past the end of the string table of size 0x0
+# STRTAB-LINK-ERR-LLVM-NEXT:   Symbol {
----------------
grimar wrote:
> jhenderson wrote:
> > I guess this is fine for now, but in an ideal world, I think we'd only print the first warning and not the second, since we already said we couldn't find the string table. In fact, in some ways the extra warning ("past the end of the string table") is slightly misleading - there is no string table at all, so you can't be "past the end" of it.
> True. Perhaps it is not that hard to improve if we make `StringRef StrTable` to be optional and change `ELFDumperStyle->printSymbol` signature and logic a bit. I'd try in a follow-up.
I've prepared the follow-up patch for this: D83042


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D82955/new/

https://reviews.llvm.org/D82955





More information about the llvm-commits mailing list