[PATCH] D91964: [llvm-readelf/obj] - Refine the implementation of `printGNUVersionSectionProlog`
George Rimar via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Nov 24 00:57:29 PST 2020
grimar added inline comments.
================
Comment at: llvm/test/tools/llvm-readobj/ELF/versym-invalid.test:81-82
-# MISALIGNED-GNU: Version symbols section '.gnu.version' contains 0 entries:
-# MISALIGNED-GNU-NEXT: Addr: 0000000000000000 Offset: 0x00ffff Link: 0 ()
# MISALIGNED-GNU-NEXT: warning: '[[FILE]]': the SHT_GNU_versym section with index 1 is misaligned
----------------
jhenderson wrote:
> This provided incidental coverage of the section having sh_link 0 and therefore that the target section was empty. Is this covered elsewhere/worth continuing to cover (with a dedicated test case)?
We explicitly check the `sh_link == 0` case on line ~30:
```
# RUN: yaml2obj --docnum=1 -DLINK=0x0 %s -o %t2
# RUN: llvm-readelf -V %t2 2>&1 | FileCheck -DFILE=%t2 %s --check-prefix=INVALID-SYMBOL-TABLE-GNU
# RUN: llvm-readobj -V %t2 2>&1 | FileCheck -DFILE=%t2 %s --check-prefix=INVALID-SYMBOL-TABLE-LLVM
```
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D91964/new/
https://reviews.llvm.org/D91964
More information about the llvm-commits
mailing list