<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Tue, Nov 24, 2015 at 2:19 PM, Hal Finkel <span dir="ltr"><<a href="mailto:hfinkel@anl.gov" target="_blank">hfinkel@anl.gov</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">----- Original Message -----<br>
> From: "Rui Ueyama" <<a href="mailto:ruiu@google.com">ruiu@google.com</a>><br>
> To: "Hal Finkel" <<a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a>><br>
> Cc: "Joerg Sonnenberger" <<a href="mailto:joerg@britannica.bec.de">joerg@britannica.bec.de</a>>, "llvm-commits" <<a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a>><br>
> Sent: Tuesday, November 24, 2015 4:11:54 PM<br>
> Subject: Re: [lld] r254003 - Revert "ELF: Make .note.GNU-stack more compatible with traditional linkers."<br>
><br>
> On Tue, Nov 24, 2015 at 2:10 PM, Hal Finkel < <a href="mailto:hfinkel@anl.gov">hfinkel@anl.gov</a> ><br>
> wrote:<br>
><br>
><br>
> ----- Original Message -----<br>
> > From: "Rui Ueyama via llvm-commits" < <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a> ><br>
> > To: "Joerg Sonnenberger" < <a href="mailto:joerg@britannica.bec.de">joerg@britannica.bec.de</a> >,<br>
> > "llvm-commits" < <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a> ><br>
> > Sent: Tuesday, November 24, 2015 3:38:39 PM<br>
> > Subject: Re: [lld] r254003 - Revert "ELF: Make .note.GNU-stack more<br>
> > compatible with traditional linkers."<br>
> ><br>
> > On Tue, Nov 24, 2015 at 1:31 PM, Joerg Sonnenberger via<br>
> > llvm-commits<br>
> > < <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a> > wrote:<br>
> ><br>
> ><br>
> > On Tue, Nov 24, 2015 at 12:24:08PM -0800, Rui Ueyama wrote:<br>
> > > My stance is they should fix the loader to ignore the section.<br>
> ><br>
> > Impossible. It's the equivalent of the BIOS. It can't be fixed.<br>
> ><br>
> > Well, they can continue using the linker they are currently using.<br>
> ><br>
> > We may want to revisit this later, but at this moment I really want<br>
> > to focus on simplicity and general usability on major Unix systems<br>
> > instead of supporting relatively minor platforms.<br>
> ><br>
><br>
> Why don't we just omit PT_GNU_STACK when -z execstack is provided? Or<br>
> add a -z nognuptstack (modulo bikeshedding)?<br>
><br>
> Do you need that?<br>
><br>
<br>
</div></div>Personally, no. But it seems like a reasonable compromise. There's no reason we need to omit non-standard headers when not needed, and if I understand the semantics correctly, omitting PT_GNU_STACK when -z execstack is provided is semantically equivalent to our current behavior (while making the binaries a few bytes smaller).<br></blockquote><div><br></div><div>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.)</div><div><br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
Thanks again,<br>
Hal<br>
<div class="HOEnZb"><div class="h5"><br>
><br>
> -Hal<br>
><br>
><br>
><br>
> ><br>
> > Joerg<br>
> > _______________________________________________<br>
> > llvm-commits mailing list<br>
> > <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
> > <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
> ><br>
> ><br>
> > _______________________________________________<br>
> > llvm-commits mailing list<br>
> > <a href="mailto:llvm-commits@lists.llvm.org">llvm-commits@lists.llvm.org</a><br>
> > <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-commits</a><br>
> ><br>
><br>
> --<br>
> Hal Finkel<br>
> Assistant Computational Scientist<br>
> Leadership Computing Facility<br>
> Argonne National Laboratory<br>
><br>
><br>
<br>
--<br>
Hal Finkel<br>
Assistant Computational Scientist<br>
Leadership Computing Facility<br>
Argonne National Laboratory<br>
</div></div></blockquote></div><br></div></div>