[llvm-readobj/elf] - Stop reporting invalid extended indexes in warnings for unnamed...
authorGeorgii Rymar <grimar@accesssoftek.com>
Fri, 18 Sep 2020 12:21:54 +0000 (15:21 +0300)
committerGeorgii Rymar <grimar@accesssoftek.com>
Tue, 22 Sep 2020 08:55:15 +0000 (11:55 +0300)
commit28b84dd138666abc005de4810af16bcf007530ea
treed3824e9c7480c887a4e22455b44553ab5e4d1f37
parented229132f1c4ea2ba0644fc345d8279e47a00565
[llvm-readobj/elf] - Stop reporting invalid extended indexes in warnings for unnamed section symbols.

We have an issue with `getFullSymbolName`: it assumes that the symbol passed is
always in the `.symtab`, what is wrong. We might calculate and report a wrong index currently.
I've added a test case revealing that.

This patch adds the "symbol index" argument to `getFullSymbolName` signature,
what fixes the issue.

Differential revision: https://reviews.llvm.org/D87899
llvm/test/tools/llvm-readobj/ELF/dyn-symbols.test
llvm/tools/llvm-readobj/ELFDumper.cpp