[lld] [ELF] Error for executable .note.GNU-stack unless -z execstack (PR #124068)

Peter Smith via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 23 07:16:31 PST 2025


================
@@ -1026,8 +1026,15 @@ InputSectionBase *ObjFile<ELFT>::createInputSection(uint32_t idx,
     // explicitly told to do otherwise (by -z execstack). Because the stack
     // executable-ness is controlled solely by command line options,
     // .note.GNU-stack sections are simply ignored.
----------------
smithp35 wrote:

I think we could update the comment. Something like
```
.note.GNU-stack sections are with one exception, ignored. We give an error message if we encounter an executable .note.GNU-stack to force the user to explicitly request an executable stack.
```

https://github.com/llvm/llvm-project/pull/124068


More information about the llvm-commits mailing list