[PATCH] D69093: [llvm-objcopy] --add-symbol: fix crash if SHT_SYMTAB does not exist
Fangrui Song via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 17 03:25:30 PDT 2019
MaskRay updated this revision to Diff 225386.
MaskRay added a comment.
if (Sec.Type == ELF::SHT_STRTAB) {
>
=
if (Sec.Type == ELF::SHT_STRTAB && !(Sec.Flags & SHF_ALLOC)) {
And add a test.
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D69093/new/
https://reviews.llvm.org/D69093
Files:
test/tools/llvm-objcopy/ELF/add-symbol-no-symtab.test
tools/llvm-objcopy/ELF/ELFObjcopy.cpp
tools/llvm-objcopy/ELF/Object.cpp
tools/llvm-objcopy/ELF/Object.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69093.225386.patch
Type: text/x-patch
Size: 9741 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20191017/de275571/attachment-0001.bin>
More information about the llvm-commits
mailing list