[PATCH] D84173: [llvm-readobj/readelf] - Don't fail dumping when unable to read the name of the SHT_DYNSYM section.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jul 21 04:31:22 PDT 2020
grimar marked an inline comment as done.
grimar added inline comments.
================
Comment at: llvm/test/tools/llvm-readobj/ELF/dyn-symbols.test:93
+# NOPHDRS-LLVM: DynamicSymbols [
+# NOPHDRS-NAME-LLVM: warning: '[[FILE]]': unable to get the name of the SHT_DYNSYM section: a section [index 2] has an invalid sh_name (0xffffffff) offset which goes past the end of the section name string table
+# NOPHDRS-LLVM-NEXT: Symbol {
----------------
grimar wrote:
> jhenderson wrote:
> > I'm not convinced we want this warning in the LLVM case - it doesn't actually need the name for anything, so emitting the warning doesn't make much sense.
> >
> > Looking at the code, it looks like the SHT_SYMTAB name lookup has a similar problem? Could the name not be looked up inside the `printSymtabMessage` function?
> > Looking at the code, it looks like the SHT_SYMTAB name lookup has a similar problem?
>
> Yes.
>
> > Could the name not be looked up inside the printSymtabMessage function?
>
> Yes. It can be done in `GNUStyle<ELFT>::printSymtabMessage` instead of `printSymbolsHelper`.
> But it should be fixed in a follow-up, I think, because the possible change relies on the `DotDynsymSec`
> introduced in this patch. I will post the fix soon.
Follow-up: D84231
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D84173/new/
https://reviews.llvm.org/D84173
More information about the llvm-commits
mailing list