[PATCH] D14571: [ELF2] - Implemented PT_GNU_STACK support, -z execstack option.

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 14 06:13:23 PST 2015


ruiu added inline comments.

================
Comment at: ELF/Driver.cpp:177
@@ -176,2 +176,3 @@
   Config->ZOrigin = hasZOption(Args, "origin");
+  Config->ZExecStack = hasZOption(Args, "execstack");
 
----------------
Sort

================
Comment at: ELF/Writer.cpp:545-546
@@ -538,2 +544,4 @@
         continue;
+      if (!shouldOutputSection(C))
+        continue;
       const Elf_Shdr *H = C->getSectionHdr();
----------------
We don't use input files' .note.GNU-stack sections at all. Maybe we should ignore them in .note.GNU-stack?

================
Comment at: ELF/Writer.cpp:898
@@ -884,3 +897,3 @@
   bool Tls = false;
   int I = 2; // 2 for PT_PHDR and the first PT_LOAD
   if (needsInterpSection())
----------------
  // 3 for PT_PHDR, first PT_LOAD and PT_GNU_STACK


http://reviews.llvm.org/D14571





More information about the llvm-commits mailing list