Probably my last word on this unless anybody has any suggestions: it's "way above my pay grade".
Segmentation fault
Basically, this appears to be a completely different problem from the "symbol versioning" one, and is caused by the fact that the linker command has been reworked to- and I know there's much more to it than this- address the issue
/usr/bin/ld: warning: link.res contains output sections; did you forget -T?
This happened between FPC 3.0 and 3.2 as can be seen if one uses the -sh option to generate ppas.sh and link.res files. The later versions add the -T option (I think Jonas explained the reason it had been omitted to me at one point), and the result is a substantial change in output structure even though the linker version is the same.
If one wants a version of FPC for x86_64 in the range 2.6.4 through 3.0.4 to run on Debian 12, one has to build it on Debian 11. But even if it will run on Debian 12, the binaries it builds probably won't.
The error message might not even be the result of code generated by the compiler, which is why gdb can't get a grip on it. The structure of the executable binary is different between 3.0 and 3.2, and that might simply be the kernel's way of announcing that it's rejecting it for security reasons: which is why it will run if invoked using sudo etc.
MarkMLl