[fpc-devel] Questions regarding m68k-atari target

Karoly Balogh charlie at scenergy.dfmk.hu
Fri Jan 28 20:21:03 CET 2022


Hi,

On Fri, 28 Jan 2022, Thorsten Otto via fpc-devel wrote:

> On Freitag, 28. Januar 2022 13:55:11 CET Thorsten Otto via fpc-devel wrote:
>
> > i still want to try to figure out what's wrong when using gas/ld)

> I get the the feeling that there must be something else going wrong:
>
> - when i run the binary compiled by using vasm/vlink in mint, it works
> - when i run the binary compiled by using gas/ld in mint, it immediately
> crashes with a bus-error.

Umm, almost like I picked vasm/vlink for Atari for a reason. :P But
tongue-in-cheek jokes aside, a fixed GAS/LD support would be nice, of
course.

> - Running the same binaries in SingleTOS, they both give me "Internal
> error 2004121202'. Then they both crash with a bus-error, too.

That's just probably a symptom of something else going wrong.

> The error number comes from def_system_macro, when it is invoked with an
> empty name. The crash seems to happen in system.o, during initalization.
> The external name of the procedure is
> 'SYSTEM_$$_RECORDRTTI$POINTER$POINTER$TRTTIPROC'

It's the mangled name of a function, of course, Sven already told in his
e-mail which one. The problem is most likely not in that function though.
I've seen similar issues before. These RTTI problems usually come from the
assembler or the linker not respecting alignment requirements to some
compiler-generated RTTI tables, while compiling or linking the object.
(Either ignoring word/longword alignment requirements, or doing word/dword
padding despite being instructed otherwise.)

You don't need the whole compiler binary either to reproduce this issue,
it's enough to compile anything which uses the sysutils and/or classes
units, that will go through the same RTTI initialization, and fail.

Charlie


More information about the fpc-devel mailing list