Closed BSzili closed 2 years ago
the idea of including the file allows you to omit
extern void __stkinit(void);
void * __x = __stkinit;
That would be even better, like it is in MorphOS, where you only need the unsigned long __stack
global variable.
I have an issue with swapstack.o as it causes a crash when the program exits, but only when the stack was replaced. I crated a minimal example program:
compile with:
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
It would also be convenient if swapstack.o was included in libnix20.a too and not just libnix13.a. That way there would be no need to specify the absolute path to have the correct version of swapstack. It shouldn't cause any issues for existing programs, as it wouldn't get linked unless __stkinit is referenced.