summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp')
-rw-r--r--llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp b/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
index ca0507d5735..7e991169124 100644
--- a/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
+++ b/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
@@ -250,7 +250,8 @@ static Error splitDWOToFile(const CopyConfig &Config, const Reader &Reader,
auto OnlyKeepDWOPred = [&DWOFile](const SectionBase &Sec) {
return onlyKeepDWOPred(*DWOFile, Sec);
};
- if (Error E = DWOFile->removeSections(OnlyKeepDWOPred))
+ if (Error E = DWOFile->removeSections(Config.AllowBrokenLinks,
+ OnlyKeepDWOPred))
return E;
if (Config.OutputArch) {
DWOFile->Machine = Config.OutputArch.getValue().EMachine;
@@ -547,7 +548,7 @@ static Error replaceAndRemoveSections(const CopyConfig &Config, Object &Obj) {
return &Obj.addSection<DecompressedSection>(*CS);
});
- return Obj.removeSections(RemovePred);
+ return Obj.removeSections(Config.AllowBrokenLinks, RemovePred);
}
// This function handles the high level operations of GNU objcopy including
OpenPOWER on IntegriCloud