Waldek Hebisch wrote:
Adriaan van Os wrote:
I believe trampolines are failing rather non-local goto's. The nonlocxxgoto.pas tests pass with --no-pic, but a simplified version of fjf35.pas fails.
program tramp;
<snip> > Assembly with --no-pic: > <snip>
How does it fail? Since the assembly contains nothing Darwin specific I tried it on Linux and for me it "works".
It crashes with a bus error KERN_PROTECTION FAILURE (0x0002) at call *%eax. The eax register points to the stack, so I fear the stack is marked non-executable. Whether this is a problem in the kernel, gcc or the linker, I have to find out. There is a Darwin linker option -allow_stack_execute, but it causes a linker error (undefined symbols: _main), which is another thing to find out why ...
Regards,
Adriaan van Os