This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
enforcing a hard page-zero segment for OSX binary deployment
- From: Qianqian Fang <fangqq at gmail dot com>
- To: gcc-help at gcc dot gnu dot org
- Date: Wed, 19 Nov 2014 13:04:04 -0500
- Subject: enforcing a hard page-zero segment for OSX binary deployment
- Authentication-results: sourceware.org; auth=none
hi list
I have been compiling a binary with static linking (-static,
-static-libgcc) to
enable wide deployment without worrying about library dependencies.
This has been working well for me for all platforms (Linux, Mac &
Windows), until the roll-out of OSX Yosemite. Users of my binaries
received "Cannot enforce a hard page-zero" error on Yosemite, and
the process got killed. A more expanded discussion can be found here
https://www.marshut.net/kshmnx/statically-linked-binaries-killed-by-signal-9-on-yosemite.html
my questions are,
1) how can I add a hard page-zero segment to a statically
linked binary using gcc/g++?
2) what's the suggested best practices when deploying a binary
on a Mac (minimizing dependency hell while maximize
forward/backward OS compatibility)?
thanks for your feedback!
Qianqian