[fpc-pascal] Compiling arm-embedded fpc

Michael Ring mail at michael-ring.org
Thu Feb 14 20:08:00 CET 2013

I might have found a hack to solve your linking problem for arm-embedded 
on linux, unfortunately I am not an expert on gnu ld, but perhaps this 
here gives a hint to somebody that knows how to properly solve your problem:

First, create a script names arm-embedded-ld with the following content:

sed --in-place "s^*(.comment)^*(.comment)\n    *(.note, .note.*)^g" link.res
/usr/local/bin/arm-embedded-ld $*

do a chmod 755 on the script so that you are able to execute it and now 
make sure that the script is found in your path before the original 
arm-embedded-ld binary so that fpc calls the small script instead of the 
real linker.

The problem seems to be that there is no definition for the note section 
in the link.res file. the small script adds this section, then the real 
linker gets called and all are happy (I hope)
You definitely need to test if after this hack you are still able to to 
debug your binary, I did not go that far.

I hope that helped,


Am 30.01.13 19:02, schrieb Michael Ring:
> I did some digging and found the following post:
> http://www.redhat.com/archives/rhl-devel-list/2007-October/msg01192.html
> and
> http://www.redhat.com/archives/rhl-devel-list/2007-October/msg01196.html
> It's quite old so I am not sure if this still is of relevance but at =
> this time Freepascal did not support the section . The workarround seems =
> to be to add --build-id to linker command so that the section is =
> automagically created.
> I will try later tonight if I have the same issue as you.
> Michael
> Am 30.01.13 18:47, schrieb Koenraad Lelong:
>> Hi,
>> An update. I tried to make a crosscompiler with the new sources on my =
>> "old" developing machine. There I still get the segmentation fault. =
>> The difference is that that machine is 64 bit, while the appliance is =
>> 32 bit.
>> Actually, that was why I made the appliance. To see if there were =
>> differences.
>> Regards,
>> Koenraad
>> _______________________________________________
>> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
>> http://lists.freepascal.org/mailman/listinfo/fpc-pascal
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: http://lists.freepascal.org/lists/fpc-pascal/attachments/20130130/d031=
> e163/attachment-0001.htm

More information about the fpc-pascal mailing list