<div dir="ltr">Please review the PR #3053.</div><div class="gmail_extra"><br><div class="gmail_quote">2016-06-18 0:17 GMT+09:00 Dmitri Gribenko <span dir="ltr"><<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Fri, Jun 17, 2016 at 7:31 AM, Sangjin Han <<a href="mailto:tinysun.net@gmail.com">tinysun.net@gmail.com</a>> wrote:<br>
> Hi,<br>
><br>
</span><span class="">> When linking libswiftCore.so, gold linker with --warn-execstack option<br>
> generates following messages.<br>
> /usr/bin/ld.gold: warning: lib/swift/linux/x86_64/swift_begin.o: missing<br>
> .note.GNU-stack section implies executable stack<br>
> /usr/bin/ld.gold: warning: lib/swift/linux/x86_64/swift_end.o: missing<br>
> .note.GNU-stack section implies executable stack<br>
><br>
> I found the web page about the GNU-stack section.<br>
> <a href="http://en.chys.info/2010/12/note-gnu-stack/" rel="noreferrer" target="_blank">http://en.chys.info/2010/12/note-gnu-stack/</a><br>
><br>
> After quick testing in my build system (Linux + execstack -q), I think we<br>
> should append one line to stdlib/public/runtime/swift_sections.S, or pass<br>
> the proper option to the linker.<br>
> The line is<br>
> .section .note.GNU-stack,"",@progbits<br>
> and the option is<br>
> '-z noexecstack' (or -Wl,-z -Wl,noexecstack for clang++).<br>
<br>
</span>The patch would be much better I think. Thank you very much for the<br>
investigation! Could you submit a pull request?<br>
<span class="HOEnZb"><font color="#888888"><br>
Dmitri<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
--<br>
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if<br>
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>>*/<br>
</div></div></blockquote></div><br></div>