OSDN Git Service

[llvm-objcopy] Fix the behavior of --strip-* and --keep-symbol
authorAlexander Shaposhnikov <shal1t712@gmail.com>
Tue, 22 May 2018 18:24:07 +0000 (18:24 +0000)
committerAlexander Shaposhnikov <shal1t712@gmail.com>
Tue, 22 May 2018 18:24:07 +0000 (18:24 +0000)
commit8eff37b3dd133daa2b5970f5a3099a97dd6ce61f
tree884c8c2285f2f7531865eef595dc7602028bc872
parenteae2e16ab1300c6baf3f15a26a33f03460ffd89d
[llvm-objcopy] Fix the behavior of --strip-* and --keep-symbol

If one runs llvm-objcopy --strip-all --keep-symbol foo
and the symbol table indeed contains the symbol "foo"
then it should not be removed.

Test plan: make check-all

Differential revision: https://reviews.llvm.org/D47052

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@333008 91177308-0d34-0410-b5e6-96231b3b80d8
test/tools/llvm-objcopy/strip-all-and-keep-symbol.test [new file with mode: 0644]
tools/llvm-objcopy/Object.h
tools/llvm-objcopy/llvm-objcopy.cpp