summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
diff options
context:
space:
mode:
authorAlexander Shaposhnikov <shal1t712@gmail.com>2018-05-11 05:27:06 +0000
committerAlexander Shaposhnikov <shal1t712@gmail.com>2018-05-11 05:27:06 +0000
commit18b5fb7b84b22e05816cec0e38241bc8f3c5c4a4 (patch)
tree8e8c0284e3170d80e63be67043b65a573dee1530 /llvm/tools/llvm-objcopy/llvm-objcopy.cpp
parent9968af4a2a640a866c2aa0cd2f1d13ab915a2530 (diff)
downloadbcm5719-llvm-18b5fb7b84b22e05816cec0e38241bc8f3c5c4a4.tar.gz
bcm5719-llvm-18b5fb7b84b22e05816cec0e38241bc8f3c5c4a4.zip
[llvm-strip] Add support for -remove-section
This diff adds support for -remove-section to llvm-strip. Test plan: make check-all Differential revision: https://reviews.llvm.org/D46567 llvm-svn: 332081
Diffstat (limited to 'llvm/tools/llvm-objcopy/llvm-objcopy.cpp')
-rw-r--r--llvm/tools/llvm-objcopy/llvm-objcopy.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
index e08648ea0af..c71e2b94728 100644
--- a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
+++ b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp
@@ -528,6 +528,10 @@ CopyConfig ParseStripOptions(ArrayRef<const char *> ArgsArr) {
Config.StripDebug = InputArgs.hasArg(STRIP_strip_debug);
if (!Config.StripDebug)
Config.StripAll = true;
+
+ for (auto Arg : InputArgs.filtered(STRIP_remove_section))
+ Config.ToRemove.push_back(Arg->getValue());
+
return Config;
}
OpenPOWER on IntegriCloud