This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
x86-darwin doesn't have an executable stack by default. There are a couple of ways to enable it:
a) Use the -allow_stack_execute flag to the linker for nested functions
b) Use -allow_stack_execute all the time
c) Use mprotect
For the general case without adding a command line flag to turn on nested functions (what's done on the apple branch) to give us something to base the linker flag off of, we'll need to use mprotect the way that it's done on the *bsd systems.
I've added it into the target directories instead of at the config/ level because the rs6000 port has a function to return the trampoline size which isn't linked into libgcc and so we need to make sure we use the darwin specific values for the rs6000 port. I also needed to add an IN_LIBGCC option for TARGET_64BIT.
Tested by bootstrap and test on x86-darwin and ppc-darwin. Fixes a pile of testcases on x86-darwin.
It isn't necessary for ppc-darwin yet, and I can #if 0 that out if we don't want it for now.
-eric
2006-02-28 Eric Christopher <echristo@apple.com>
* config/rs6000/darwin.h (ENABLE_STACK_EXECUTE): Define. Set up IN_LIBGCC definition of TARGET_64BIT. * config/i386/darwin.h (ENABLE_STACK_EXECUTE): Define.
Attachment:
smime.p7s
Description: S/MIME cryptographic signature
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |