The trouble with stackoverflow is that is is an ungooglable error :-)
But lucky I found this:
I often see people define arrays of large size as local vars in a function, and they are unaware that this ends up in stack space.
Indeed! I tumbled into that booby trap also.
Note to self: define large data arrays as const outside any function.
It appears that GCC includes the standard C libraries libnix which defaults to V37 of Amiga libraries.
This makes it pretty hard to target kickstart 1.3 amigas as v37 was included with kickstart 2.04 ...
You can avoid this by using the -nostdlib flag but this opens a whole can of worms (no reference to __main, no reference to atexit ....)
So as a general rule: If you want to target kickstart 1.3 or lower: avoid GCC, use VBCC or SAS/C instead.
For cross-compilation with GCC, like this one , you can target kichstart 1.3:
m68k-amigaos-gcc test.cpp -mcrt=nix13