[PATCH] D94907: [llvm-nm][ELF] - Make -D display symbol versions.
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 19 05:51:14 PST 2021
grimar added inline comments.
================
Comment at: llvm/test/tools/llvm-nm/dynamic.test:153
+
+## Case 2: check we report a warning when we are unable to read a SHT_GNU_versym section entry.
+## In this case it has a size that is not a multiple of its sh_entsize.
----------------
jhenderson wrote:
> Here the thing you can't read is the section, not the section entry, right? If so, delete the "entry" in this sentence.
The reported warning is:
```
# VERSION-ERR2: warning: unable to read symbol versions: unable to read an entry with index 1 from SHT_GNU_versym section with index 1: section [index 1] has an invalid sh_size (255) which is not a multiple of its sh_entsize (2)
```
I.e. I can't read a particular entry because there is an issue with extracting all section entries.
The test case tries to trigger the following code in `readSymbolVersionsELF`:
```
if (!VerEntryOrErr)
return createError("unable to read an entry with index " + Twine(I) +
" from " + describe(Obj, *SymVerSec) + ": " +
toString(VerEntryOrErr.takeError()));
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D94907/new/
https://reviews.llvm.org/D94907
More information about the llvm-commits
mailing list