I'm a bit stuck.
Having a closer look at the code I can see that it primarily consist out of basic Pascal functions.
Some nested, some forwarded but that is about the most exiting bit in there. Only sysutils is used, and things are written for mode objfpc.
Turning on overflow checking will get a bit further, but then the linker bails out again.
$ fpc -V3.2.0 -B -MOBJFPC -Co -Pm68k -Tamiga -XV -AVasm mp.pas -FD/home/ron/bin/binutils
Free Pascal Compiler version 3.2.0rc1 [2020/04/30] for m68k
Copyright (c) 1993-2020 by Florian Klaempfl and others
Target OS: Commodore Amiga
Compiling mp.pas
mp.pas(357,51) Note: Values in enumeration types have to be ascending
mp.pas(20100,16) Note: Local variable "AllocElementType" is assigned but never used
mp.pas(20101,5) Note: Local variable "NumAllocElements" is assigned but never used
mp.pas(24186,5) Note: Local variable "NumAllocElements" is assigned but never used
mp.pas(24475,33) Note: Local variable "ParamIndex" not used
mp.pas(24475,45) Note: Local variable "idx" not used
mp.pas(29842,3) Note: Local variable "NumAllocTypes" not used
Assembling madpascal
Linking mp
Fatal error 1: Out of memory.
Aborting.
Error: Error while linking
Fatal: There were 1 errors compiling module, stopping
Fatal: Compilation aborted
Error: /home/ron/bin/fpc/3.2.0/bin/arm-linux/ppcross68k returned an error exitcode
I have run a couple of other tests against this setup and those seem to work ok so far (although I haven't actually tested the resulting execs from those tests)
Is there anything else I can try with my limited knowledge on the asm/linker backend ?