[lld] r254003 - Revert "ELF: Make .note.GNU-stack more compatible with traditional linkers."

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Tue Nov 24 14:42:48 PST 2015


On Tue, Nov 24, 2015 at 2:37 PM, Joerg Sonnenberger via llvm-commits <
llvm-commits at lists.llvm.org> wrote:

> On Tue, Nov 24, 2015 at 02:23:34PM -0800, Rui Ueyama wrote:
> > Omitting PT_GNU_STACK when -z execstack is provided is easy, but it leads
> > to a counter-intuitive behavior on platforms that do not recognize
> > PT_GNU_STACK and stack is not executable by default. (You need to pass -z
> > execstack to make it run on such platforms, but it wouldn't make the
> stack
> > executable.)
>
> That argument makes no sense to me and I am not even sure I understand
> it correctly. A platform (like NetBSD) that doesn't recognize
> PT_GNU_STACK and provides a non-executable stack by default will not be
> affected at all. Yes, it won't do what is intended, but it is no worse
> than the current situation of creating a bogus program header either.
>

Let me rephrase. That you needs to pass "-z execstack" (although you don't
intend to make the stack executable) to make the output compatible with a
platform that rejects executables with PT_GNU_STACK is I think
counter-intuitive.


> Joerg
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151124/c34b8831/attachment.html>


More information about the llvm-commits mailing list