[PATCH] D13055: [ELF2] Handle -m option

Denis Protivensky via llvm-commits llvm-commits at lists.llvm.org
Tue Sep 22 08:28:44 PDT 2015


denis-protivensky added inline comments.

================
Comment at: ELF/Config.h:39
@@ -25,1 +38,3 @@
+  ELFKind TargetELFKind = ELF64LEKind;
+  uint16_t TargetEMachine = llvm::ELF::EM_X86_64;
 };
----------------
emaste wrote:
> Do we have a way to get the host architecture type already?
I'll rework this part so initial architecture doesn't matter that much. Will pick ELF & machine types from the first input file.

================
Comment at: ELF/Driver.cpp:49-52
@@ +48,6 @@
+static const Emulation Emulations[] = {
+    {"elf_x86_64", ELF64LEKind, EM_X86_64},
+    {"elf_i386", ELF32LEKind, EM_386},
+    {"elf64ppc", ELF64BEKind, EM_PPC64},
+    {"elf32ppc", ELF32BEKind, EM_PPC},
+};
----------------
emaste wrote:
> Can we pick a sorting order so that as this list grows it stays consistent?
Will sort by emulation name.


http://reviews.llvm.org/D13055





More information about the llvm-commits mailing list