I seem to have a difficult time getting the stackswap code to work. I created a small example that crashes at exit if the stackswap code runs. If I give a large stack before starting the program it exits normally.
stkswaptest.c
Code:
extern void __stkinit(void);
void * __x = __stkinit;
unsigned long __stack = (32*1024);
int main(void)
{
return 0;
}
I build it with this command:
m68k-amigaos-gcc -noixemul -m68060 -m68881 -ffast-math -O2 -fomit-frame-pointer -o stkswap stkswaptest.c /opt/amiga/m68k-amigaos/libnix/lib/libm020/libm881/swapstack.o
Could this be an issue with libnix?