<div dir="ltr"><div>Hi, Han</div><div><br></div><div>Your PR is very helpful. Thanks a lot.</div><div><br></div><div>The Foundation repo has some assembly files similar to swift_sections.S as follows:</div><div> swift-corelibs-foundation/CoreFoundation/String.subproj/</div><div><font color="#000000"> CFCharacterSetData.S</font></div><div><span><font color="#000000"> CFUniCharPropertyDatabase.S</font></span><br></div><div><span><font color="#000000"> CFUnicodeData.S</font></span></div><div><span><font color="rgb(0,0,0)"><br></font></span></div><div><span><font color="rgb(0,0,0)">The generated libFoundation.so is marked as executable stack on Linux, too.</font></span></div><div><span><font color="rgb(0,0,0)"><br></font></span></div><div><span><font color="rgb(0,0,0)">Would you do me a favor of posting simlar PR to the Foundation Project?</font></span></div><div><span><font color="rgb(0,0,0)">Very sorry, I am a git novice.</font></span></div><div><span><font color="rgb(0,0,0)"><br></font></span></div><div><span><font color="rgb(0,0,0)">Thanks.</font></span></div><div><span><font color="rgb(0,0,0)"><br></font></span></div><div><span><font color="rgb(0,0,0)"><br></font></span></div><div><span><font color="rgb(0,0,0)">-Kim, Jongsu</font></span></div><div><span><font color="rgb(0,0,0)"><br></font></span></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Jun 18, 2016 at 5:30 PM, Dmitri Gribenko <span dir="ltr"><<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Thank you! I merged your PR, it should be included in the next snapshot.<br>
<span class="HOEnZb"><font color="#888888"><br>
Dmitri<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Fri, Jun 17, 2016 at 2:26 PM, Sangjin Han <<a href="mailto:tinysun.net@gmail.com">tinysun.net@gmail.com</a>> wrote:<br>
> Please review the PR #3053.<br>
><br>
> 2016-06-18 0:17 GMT+09:00 Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>>:<br>
>><br>
>> On Fri, Jun 17, 2016 at 7:31 AM, Sangjin Han <<a href="mailto:tinysun.net@gmail.com">tinysun.net@gmail.com</a>><br>
>> wrote:<br>
>> > Hi,<br>
>> ><br>
>> > 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/" target="_blank" rel="noreferrer">http://en.chys.info/2010/12/note-gnu-stack/</a><br>
>> ><br>
>> > After quick testing in my build system (Linux + execstack -q), I think<br>
>> > we<br>
>> > should append one line to stdlib/public/runtime/swift_sections.S, or<br>
>> > 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>
>> The patch would be much better I think. Thank you very much for the<br>
>> investigation! Could you submit a pull request?<br>
>><br>
>> Dmitri<br>
>><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>
><br>
><br>
<br>
<br>
<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>