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

Rui Ueyama via llvm-commits llvm-commits at lists.llvm.org
Mon Nov 16 12:50:27 PST 2015


On Mon, Nov 16, 2015 at 12:42 PM, Rafael EspĂ­ndola <
rafael.espindola at gmail.com> wrote:

> > Is the last one reliable sign that the linker can emit PT_GNU_STACK
> segment?
> > If it is, that means compilers knew whether PT_GNU_STACK is supported or
> not
> > for each platform, no?
>
> It could be made reliable, but looking at it it seems it is not :-(
> Clang produces it for netbsd for example.
>
> I think the only compatible way is to implement the old logic of, if
> not given an explicit option, only add the program header if all files
> have the section.
>

I agree. This is pretty unfortunate though.


> But we should also change clang to pass the option to the linker when
> targeting linux so that we can at least hope to have a simpler
> solution in the future.
>
> Cheers,
> Rafael
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20151116/af7aabd4/attachment.html>


More information about the llvm-commits mailing list