aboutsummaryrefslogtreecommitdiff
path: root/llvm/docs/CommandGuide/llvm-objcopy.rst
diff options
context:
space:
mode:
authorJames Henderson <james.henderson@sony.com>2021-02-26 13:44:48 +0000
committerJames Henderson <james.henderson@sony.com>2021-03-04 10:23:45 +0000
commit8bb74d16ef04d83f71b1873e7c2e652fb8287b29 (patch)
tree57f47f7f4099596d750bf968f2ace4b32ebab2a8 /llvm/docs/CommandGuide/llvm-objcopy.rst
parent6e5342a6b0f4172ab6ce49e5d315309ec06b2a27 (diff)
downloadllvm-8bb74d16ef04d83f71b1873e7c2e652fb8287b29.zip
llvm-8bb74d16ef04d83f71b1873e7c2e652fb8287b29.tar.gz
llvm-8bb74d16ef04d83f71b1873e7c2e652fb8287b29.tar.bz2
[llvm-objcopy/strip] Fix off-by-one error in SYMTAB_SHNDX need check
The check for whether an extended symbol index table was required dropped the first SHN_LORESERVE sections from the sections array before checking whether the remaining sections had symbols. Unfortunately, the null section header is not present in this list, so the check was skipping the first section that might be important. If that section contained a symbol, and no subsequent ones did, the .symtab_shndx section would not be emitted, leading to a corrupt object. Also consolidate and expand test coverage in the area to cover this bug and other aspects of the SYMTAB_SHNDX section. Reviewed by: alexshap, MaskRay Differential Revision: https://reviews.llvm.org/D97661
Diffstat (limited to 'llvm/docs/CommandGuide/llvm-objcopy.rst')
0 files changed, 0 insertions, 0 deletions