[PATCH] D82935: [llvm-objcopy] Fix crash when removing symbol table at same time as adding a symbol
Georgy Komarov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Jul 1 01:02:48 PDT 2020
jubnzv created this revision.
jubnzv added reviewers: jhenderson, grimar, MaskRay.
Herald added subscribers: llvm-commits, abrachet, emaste.
Herald added a reviewer: espindola.
Herald added a reviewer: alexshap.
Herald added a reviewer: rupprecht.
Herald added a project: LLVM.
This patch resolves crash that occurs when user wanted to remove all
symbols and add a brand new one using:
llvm-objcopy -R .symtab --add-symbol foo=1234 in.o out.o
Before these changes the symbol table internally being null when adding
new symbols. For now we will regenerate symtab in this case.
This fixes: https://bugs.llvm.org/show_bug.cgi?id=43930
https://reviews.llvm.org/D82935
Files:
llvm/test/tools/llvm-objcopy/ELF/add-symbol-no-symtab.test
llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
llvm/tools/llvm-objcopy/ELF/Object.cpp
llvm/tools/llvm-objcopy/ELF/Object.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D82935.274703.patch
Type: text/x-patch
Size: 4647 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20200701/e0ae0ed3/attachment.bin>
More information about the llvm-commits
mailing list