This is an archive of the discontinued LLVM Phabricator instance.

[llvm-readobj] - Don't get the name of the symbol table in ELFDumper<ELFT>::printSymbolsHelper.
ClosedPublic

Authored by grimar on Jul 21 2020, 4:30 AM.

Details

Summary

It was requested in D84173 thread to not do it, because otherwise we extract and
check the name of the symbol table in LLVM style, but do not use it and
might report a warning which perhaps might be confusing.

Diff Detail

Event Timeline

grimar created this revision.Jul 21 2020, 4:30 AM
Herald added a project: Restricted Project. · View Herald Transcript
MaskRay added inline comments.Jul 21 2020, 11:05 PM
llvm/tools/llvm-readobj/ELFDumper.cpp
3956

The original messages carry more information as a symbol table can represent either SHT_DYNSYM or SHT_SYMTAB... I am fine combing them, though

jhenderson added inline comments.Jul 22 2020, 1:09 AM
llvm/test/Object/invalid.test
292

This seems to be missing context that was useful before? In other words, what went wrong here?

llvm/tools/llvm-readobj/ELFDumper.cpp
3956

Could you use the new describe function from D84240 to resolve that?

grimar updated this revision to Diff 279786.Jul 22 2020, 5:41 AM
grimar marked 5 inline comments as done.
  • Addressed review comments.
llvm/test/Object/invalid.test
292

The llvm-readobj doesn't try to read a name for a symbol table in ELFDumper<ELFT>::printSymbolsHelper
for no reason anymore.

The original YAML produces no warning with this patch. I had to change it slightly
to force the llvm-readobj code to try to read the .shstrtab section name again.
So the different message is shown, but the reason (an invalid sh_offset, which is tested here) remains the same,

llvm/tools/llvm-readobj/ELFDumper.cpp
3956

Could you use the new describe function from D84240 to resolve that?

Yes. Done.

This revision is now accepted and ready to land.Jul 22 2020, 6:15 AM
This revision was automatically updated to reflect the committed changes.