diff options
author | Jake Ehrlich <jakehehrlich@google.com> | 2017-10-10 18:32:22 +0000 |
---|---|---|
committer | Jake Ehrlich <jakehehrlich@google.com> | 2017-10-10 18:32:22 +0000 |
commit | c5ff72708d232079e1c2099165584cf8d03e1c7e (patch) | |
tree | 8271c157e974cec8a6b0ba96696b6781f68db83e /llvm/tools/llvm-objcopy/llvm-objcopy.cpp | |
parent | 77ec1ffe5c8046e24e3cd2a5d27f7497badea741 (diff) | |
download | bcm5719-llvm-c5ff72708d232079e1c2099165584cf8d03e1c7e.tar.gz bcm5719-llvm-c5ff72708d232079e1c2099165584cf8d03e1c7e.zip |
Revert "temporary"
I forgot to add a proper commit message. I'm reverting this
to fix that.
This reverts commit r315344.
llvm-svn: 315345
Diffstat (limited to 'llvm/tools/llvm-objcopy/llvm-objcopy.cpp')
-rw-r--r-- | llvm/tools/llvm-objcopy/llvm-objcopy.cpp | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp index 775c5ae42b6..9b233951b8d 100644 --- a/llvm/tools/llvm-objcopy/llvm-objcopy.cpp +++ b/llvm/tools/llvm-objcopy/llvm-objcopy.cpp @@ -56,24 +56,17 @@ cl::opt<std::string> OutputFilename(cl::Positional, cl::desc("<output>"), cl::opt<std::string> OutputFormat("O", cl::desc("set output format to one of the following:" "\n\tbinary")); -// TODO: make this a cl::list to support removing multiple sections -cl::opt<std::string> ToRemove("remove-section", - cl::desc("Remove a specific section")); -cl::alias ToRemoveA("R", cl::desc("Alias for remove-section"), cl::aliasopt(ToRemove)); void CopyBinary(const ELFObjectFile<ELF64LE> &ObjFile) { std::unique_ptr<FileOutputBuffer> Buffer; std::unique_ptr<Object<ELF64LE>> Obj; if (!OutputFormat.empty() && OutputFormat != "binary") error("invalid output format '" + OutputFormat + "'"); + if (!OutputFormat.empty() && OutputFormat == "binary") Obj = llvm::make_unique<BinaryObject<ELF64LE>>(ObjFile); else Obj = llvm::make_unique<ELFObject<ELF64LE>>(ObjFile); - if (!ToRemove.empty()) { - Obj->removeSections( - [&](const SectionBase &Sec) { return ToRemove == Sec.Name; }); - } Obj->finalize(); ErrorOr<std::unique_ptr<FileOutputBuffer>> BufferOrErr = FileOutputBuffer::create(OutputFilename, Obj->totalSize(), |