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

George Rimar via llvm-commits llvm-commits at lists.llvm.org
Sat Nov 14 06:59:06 PST 2015


grimar added inline comments.

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


```
switch (Sec.sh_type) {
...
 default:
    if (NameOrErr == ".note.GNU-stack")
      Sections[I] = &InputSection<ELFT>::Discarded;
```


http://reviews.llvm.org/D14571





More information about the llvm-commits mailing list