<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Mon, Nov 16, 2015 at 12:42 PM, Rafael Espíndola <span dir="ltr"><<a href="mailto:rafael.espindola@gmail.com" target="_blank">rafael.espindola@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">> Is the last one reliable sign that the linker can emit PT_GNU_STACK segment?<br>
> If it is, that means compilers knew whether PT_GNU_STACK is supported or not<br>
> for each platform, no?<br>
<br>
</span>It could be made reliable, but looking at it it seems it is not :-(<br>
Clang produces it for netbsd for example.<br>
<br>
I think the only compatible way is to implement the old logic of, if<br>
not given an explicit option, only add the program header if all files<br>
have the section.<br></blockquote><div><br></div><div>I agree. This is pretty unfortunate though.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
But we should also change clang to pass the option to the linker when<br>
targeting linux so that we can at least hope to have a simpler<br>
solution in the future.<br>
<br>
Cheers,<br>
Rafael<br>
</blockquote></div><br></div></div>