summaryrefslogtreecommitdiffstats
path: root/llvm/tools
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools')
-rw-r--r--llvm/tools/llvm-objcopy/CopyConfig.cpp4
-rw-r--r--llvm/tools/llvm-objcopy/CopyConfig.h2
-rw-r--r--llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp4
-rw-r--r--llvm/tools/llvm-objcopy/ObjcopyOpts.td6
4 files changed, 8 insertions, 8 deletions
diff --git a/llvm/tools/llvm-objcopy/CopyConfig.cpp b/llvm/tools/llvm-objcopy/CopyConfig.cpp
index 73611778c93..24f0e29d492 100644
--- a/llvm/tools/llvm-objcopy/CopyConfig.cpp
+++ b/llvm/tools/llvm-objcopy/CopyConfig.cpp
@@ -315,8 +315,8 @@ DriverConfig parseObjcopyOptions(ArrayRef<const char *> ArgsArr) {
Config.ToRemove.push_back(Arg->getValue());
for (auto Arg : InputArgs.filtered(OBJCOPY_keep_section))
Config.KeepSection.push_back(Arg->getValue());
- for (auto Arg : InputArgs.filtered(OBJCOPY_only_keep))
- Config.OnlyKeep.push_back(Arg->getValue());
+ for (auto Arg : InputArgs.filtered(OBJCOPY_only_section))
+ Config.OnlySection.push_back(Arg->getValue());
for (auto Arg : InputArgs.filtered(OBJCOPY_add_section))
Config.AddSection.push_back(Arg->getValue());
for (auto Arg : InputArgs.filtered(OBJCOPY_dump_section))
diff --git a/llvm/tools/llvm-objcopy/CopyConfig.h b/llvm/tools/llvm-objcopy/CopyConfig.h
index f6585116cdf..ce6ead80b7c 100644
--- a/llvm/tools/llvm-objcopy/CopyConfig.h
+++ b/llvm/tools/llvm-objcopy/CopyConfig.h
@@ -61,7 +61,7 @@ struct CopyConfig {
std::vector<StringRef> AddSection;
std::vector<StringRef> DumpSection;
std::vector<StringRef> KeepSection;
- std::vector<StringRef> OnlyKeep;
+ std::vector<StringRef> OnlySection;
std::vector<StringRef> SymbolsToGlobalize;
std::vector<StringRef> SymbolsToKeep;
std::vector<StringRef> SymbolsToLocalize;
diff --git a/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp b/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
index 7430b19c772..3b9f62e9b5f 100644
--- a/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
+++ b/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
@@ -415,10 +415,10 @@ static void handleArgs(const CopyConfig &Config, Object &Obj,
};
// Explicit copies:
- if (!Config.OnlyKeep.empty()) {
+ if (!Config.OnlySection.empty()) {
RemovePred = [&Config, RemovePred, &Obj](const SectionBase &Sec) {
// Explicitly keep these sections regardless of previous removes.
- if (is_contained(Config.OnlyKeep, Sec.Name))
+ if (is_contained(Config.OnlySection, Sec.Name))
return false;
// Allow all implicit removes.
diff --git a/llvm/tools/llvm-objcopy/ObjcopyOpts.td b/llvm/tools/llvm-objcopy/ObjcopyOpts.td
index 73985ef8f62..1f7e64e4091 100644
--- a/llvm/tools/llvm-objcopy/ObjcopyOpts.td
+++ b/llvm/tools/llvm-objcopy/ObjcopyOpts.td
@@ -78,9 +78,9 @@ defm redefine_symbol
MetaVarName<"old=new">;
defm keep_section : Eq<"keep-section", "Keep <section>">,
MetaVarName<"section">;
-defm only_keep : Eq<"only-keep", "Remove all but <section>">,
- MetaVarName<"section">;
-def j : JoinedOrSeparate<["-"], "j">, Alias<only_keep>;
+defm only_section : Eq<"only-section", "Remove all but <section>">,
+ MetaVarName<"section">;
+def j : JoinedOrSeparate<["-"], "j">, Alias<only_section>;
defm add_section
: Eq<"add-section",
"Make a section named <section> with the contents of <file>.">,
OpenPOWER on IntegriCloud