[PATCH] D53311: [llvm-objcopy] Introduce dispatch mechanism based on input type
James Henderson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 23 01:45:35 PDT 2018
jhenderson accepted this revision.
jhenderson added a comment.
This revision is now accepted and ready to land.
Much better, thanks!
LGTM, although I do have one query about raw binary input. Should this go through a similar dispatch mechanism to enable other file formats to read in raw binary?
================
Comment at: llvm-objcopy.cpp:655
FileBuffer FB(Config.OutputFilename);
- BinaryReader Reader(Config.BinaryArch, BufOrErr->get());
- executeElfObjcopyOnBinary(Config, Reader, FB,
- getOutputElfType(Config.BinaryArch));
+ elf::executeObjcopyOnRawBinary(Config, *BufOrErr->get(), FB);
} else {
----------------
It seems a bit odd still having mention of elf at this level. Is it allowed to read binary input for COFF or Mach-O output?
Repository:
rL LLVM
https://reviews.llvm.org/D53311
More information about the llvm-commits
mailing list