[swift-dev] Standard shared libraries with executable stack
Jongsu Kim
kimjs29 at gmail.com
Sat Jun 18 22:04:15 CDT 2016
Hi, Han
Your PR is very helpful. Thanks a lot.
The Foundation repo has some assembly files similar to swift_sections.S as
follows:
swift-corelibs-foundation/CoreFoundation/String.subproj/
CFCharacterSetData.S
CFUniCharPropertyDatabase.S
CFUnicodeData.S
The generated libFoundation.so is marked as executable stack on Linux, too.
Would you do me a favor of posting simlar PR to the Foundation Project?
Very sorry, I am a git novice.
Thanks.
-Kim, Jongsu
On Sat, Jun 18, 2016 at 5:30 PM, Dmitri Gribenko <gribozavr at gmail.com>
wrote:
> Thank you! I merged your PR, it should be included in the next snapshot.
>
> Dmitri
>
> On Fri, Jun 17, 2016 at 2:26 PM, Sangjin Han <tinysun.net at gmail.com>
> wrote:
> > Please review the PR #3053.
> >
> > 2016-06-18 0:17 GMT+09:00 Dmitri Gribenko <gribozavr at gmail.com>:
> >>
> >> On Fri, Jun 17, 2016 at 7:31 AM, Sangjin Han <tinysun.net at gmail.com>
> >> wrote:
> >> > Hi,
> >> >
> >> > When linking libswiftCore.so, gold linker with --warn-execstack option
> >> > generates following messages.
> >> > /usr/bin/ld.gold: warning: lib/swift/linux/x86_64/swift_begin.o:
> missing
> >> > .note.GNU-stack section implies executable stack
> >> > /usr/bin/ld.gold: warning: lib/swift/linux/x86_64/swift_end.o: missing
> >> > .note.GNU-stack section implies executable stack
> >> >
> >> > I found the web page about the GNU-stack section.
> >> > http://en.chys.info/2010/12/note-gnu-stack/
> >> >
> >> > After quick testing in my build system (Linux + execstack -q), I think
> >> > we
> >> > should append one line to stdlib/public/runtime/swift_sections.S, or
> >> > pass
> >> > the proper option to the linker.
> >> > The line is
> >> > .section .note.GNU-stack,"", at progbits
> >> > and the option is
> >> > '-z noexecstack' (or -Wl,-z -Wl,noexecstack for clang++).
> >>
> >> The patch would be much better I think. Thank you very much for the
> >> investigation! Could you submit a pull request?
> >>
> >> Dmitri
> >>
> >> --
> >> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> >> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
> >
> >
>
>
>
> --
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160619/f7ba3202/attachment.html>
More information about the swift-dev
mailing list