[swift-dev] Standard shared libraries with executable stack
Jongsu Kim
kimjs29 at gmail.com
Thu Jun 16 07:17:25 CDT 2016
Hi,
This could have been caused by our switch from the BFD linker to gold.
> Could you try linking a hello world program using gold linker and
> running it in WSL?
>
I tried to build Swift by not using -fuse-gold option and the result was
same.
Are you sure that PROT_GROWSDOWN is the flag that enables executable
> stack? I thought that's what PROT_EXEC is for. I'm not sure what
> PROT_GROWSDOWN actually changes, if I were to speculate, I'd say it
> could be a marker that means "this is a stack" or maybe even be just a
> performance hint.
>
You are right. The executable stack is enabled by PROT_EXEC.
But Swift shared library's executable stack seems to set PROT_EXEC AND
PROT_GROWSDOWN according to strace.
I don't know what causes Swift shared library to have executable stack
since Febrary 25 snapshot. Febrary 8 snapshot and Swift 2.X branches have
no such executable stack shared library.
Thanks,
-Kim, Jongsu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-dev/attachments/20160616/aadcf02a/attachment.html>
More information about the swift-dev
mailing list