[PATCH] D15575: [ELF] Allow target to configure ELF header flags in the output file

Simon Atanasyan via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 16 09:32:59 PST 2015


atanasyan added inline comments.

================
Comment at: ELF/Target.cpp:1257-1261
@@ -1256,2 +1256,7 @@
   GotHeaderEntriesNum = 2;
+  // FIXME: In fact ELF flags depends on ELF flags of input object files
+  // and selected emulation.
+  ELFFlags = EF_MIPS_ABI_O32 | EF_MIPS_CPIC | EF_MIPS_ARCH_32R2;
+  if (Config->Shared)
+    ELFFlags |= EF_MIPS_PIC;
 }
----------------
ruiu wrote:
> Instead of assigning a value to ELFFlags member, can you move this code to getELFFlags and return a new value without assignment?
Do you suggest to make the `getELFFlags` virtual or put `if (Config->EMachine == EM_MIPS)` into it?


Repository:
  rL LLVM

http://reviews.llvm.org/D15575





More information about the llvm-commits mailing list