[PATCH] D53667: [llvm-objcopy] Handle -O <format> flag.

Alexander Shaposhnikov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 25 11:34:16 PDT 2018


alexshap added inline comments.


================
Comment at: tools/llvm-objcopy/llvm-objcopy.cpp:259
+  if (!Config.OutputFormat.empty() && Config.OutputFormat != "binary")
+    Obj.setArch(Config.OutputArch);
+
----------------
maybe i'm missing smth and Jake / James can clarify / comment on it,
but looks like that this basically propagates the info about the format to Object (Object = "intermediate representation" which has been arch-agnostic (mostly) so far (if i understand correctly)) (so that different elf/binary input/output formats can be mixed and matched by substituting different Readers/Writers (if i'm not mistaken that was the main idea)). More precisely, I'm wondering if Object should be aware of the Arch or, alternatively, we should make Writer take care of this.  cc: @jakehehrlich 


Repository:
  rL LLVM

https://reviews.llvm.org/D53667





More information about the llvm-commits mailing list