[fpc-pascal] Compiling arm-embedded fpc

Michael Ring mail at michael-ring.org
Thu Feb 14 21:34:30 CET 2013

I did a grep through the fpc sourcecode and found a reference in 
./compiler/systems/t_linux.pas in an arm related ifdef section

           add('  .note.gnu.build-id : { *(.note.gnu.build-id) }');

so perhaps this is really missing in arm-embedded target.

The patch for for fpc/compiler/systems/t_embed.pas seems to be pretty 
straightforward, I will create the patch and test if debugging still works.


by the way:

I used binutils-2.23.1 to create the cross-tools, configure script was:

./configure --target=arm-none-eabi --program-prefix=arm-embedded-

compiled under Fedora-18.

Am 14.02.13 20:41, schrieb Jeppe Græsdal Johansen:
> Den 14-02-2013 20:39, Florian Klämpfl skrev:
>> Am 14.02.2013 20:08, schrieb Michael Ring:
>>> 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:
>>> #!/bin/sh
>>> sed --in-place "s^*(.comment)^*(.comment)\n    *(.note, .note.*)^g"
>>> link.res
>>> /usr/local/bin/arm-embedded-ld $*
>> If this is already needed (for me it worked always without), please
>> provide a patch for fpc/compiler/systems/t_embed.pas The linker script
>> generation for arm starts at line 222.
> Sounds to me like a broken binutils. I have never heard about the 
> .note section, except for some warnings now and then on obscure platforms
> _______________________________________________
> fpc-pascal maillist  -  fpc-pascal at lists.freepascal.org
> http://lists.freepascal.org/mailman/listinfo/fpc-pascal

More information about the fpc-pascal mailing list