[PATCH] D65040: [llvm-objcopy] Add support for --add-section for COFF
Sergey Dmitriev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 22 19:54:25 PDT 2019
sdmitriev marked 6 inline comments as done.
sdmitriev added inline comments.
================
Comment at: llvm/tools/llvm-objcopy/COFF/COFFObjcopy.cpp:175
+ for (const auto &Flag : Config.AddSection) {
+ StringRef SecName, FileName;
+ std::tie(SecName, FileName) = Flag.split("=");
----------------
jhenderson wrote:
> Rather than having a big block of code that is broadly similar to the addGnuDebugLink code, I wonder if some of the body of this loop and that function could be factored out into a function, which takes an Object, some section contents, and maybe one or two other parameters to do with addresses and adds a section to that Object.
I have refactored this code into an addSection function. Please review revised changes.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D65040/new/
https://reviews.llvm.org/D65040
More information about the llvm-commits
mailing list