<div dir="ltr">Fair. I want to make LLD useful (or useable at least) on NetBSD, so adding PT_GNU_STACK unconditionally wouldn't work. But, I don't want to copy the nastiness of the existing linkers checking all input files' .note.GNU-stack sections. I want to do that in a different way.<div><br></div><div>What if you want to make stack executable on NetBSD, how can you control it?</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Nov 16, 2015 at 10:32 AM, Joerg Sonnenberger via llvm-commits <span dir="ltr"><<a href="mailto:llvm-commits@lists.llvm.org" target="_blank">llvm-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Mon, Nov 16, 2015 at 08:58:14AM -0800, Rui Ueyama wrote:<br>
> Does a loader reject an executable if it does not understand PT_GNU_STACK<br>
> section?<br>
<br>
</span>Yes. We got a bug report last month exactly about this kind of situation.<br>
Given that there is no sane way for stripping a program header entry,<br>
that's quite nasty.<br>
<span class=""><br>
<br>
> > The problem is that there are legacy loaders e.g. on PowerPC that can't<br>
> > be updated. It's not supported on NetBSD because the stack is not<br>
> > executable by default, period. But that's a slightly different story.<br>
> ><br>
><br>
> Why do you want to use a new linker with an older system?<br>
<br>
</span>Same reason for why people update the compiler. The hardware exists, no<br>
reason not to maximize the usefulness.<br>
<div class="HOEnZb"><div class="h5"><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>
</div></div></blockquote></div><br></div>