]> granicus.if.org Git - llvm/commit
[llvm-objcopy] Add --strip-all-gnu and change --strip-all
authorJake Ehrlich <jakehehrlich@google.com>
Mon, 27 Nov 2017 18:56:01 +0000 (18:56 +0000)
committerJake Ehrlich <jakehehrlich@google.com>
Mon, 27 Nov 2017 18:56:01 +0000 (18:56 +0000)
commit237a48e816fd2a3f7ead3f029bb331078ffa94cc
treeb27d9d9202d504179f2947b5d83c15b652b24c15
parent81a153c99a29006cf55b31f0ba898faf3ecd02b5
[llvm-objcopy] Add --strip-all-gnu and change --strip-all

GNU's --strip-all doesn't strip as aggressively as it could in general.
Currently llvm-objcopy copies the exact behavoir of GNU's --strip-all.
eu-strip is used as a drop in replacement for GNU strip/objcopy in many many
places without issue. eu-strip removes non-allocated sections and keeps
.gnu.warning* sections. Because --strip-all will likely be the most widely
used stripping option we should make --strip-all as aggressive as it can safely
be. Since we have evidence from eu-strip that this is a safe option we should
allow it. For those that might still have an issue afterwards I've added
--strip-all-gnu as an exact drop in replacement for GNU's --strip-all as well.

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