<p>Am 22.02.2016 07:16 schrieb "Abou Al Montacir" <<a href="mailto:abou.almontacir@sfr.fr">abou.almontacir@sfr.fr</a>>:<br>
><br>
> I finally managed to find the wrong option! It is -fPIC.<br>
> Below are Â tests with only -fPIC and with only -O2.<br>
><br>
> (sid_armel-dchroot)abou@abel:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ fpc -fPIC test2 && ./test2<br>
><br>
> Free Pascal Compiler version 3.0.0+dfsg-2 [2016/01/28] for arm<br>
><br>
> Copyright (c) 1993-2015 by Florian Klaempfl and others<br>
><br>
> Target OS: Linux for ARMEL<br>
><br>
> Compiling test2.pas<br>
><br>
> Assembling test<br>
><br>
> Linking test2<br>
><br>
> /usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T?<br>
><br>
> 4 lines compiled, 0.3 sec<br>
><br>
> Runtime error 103 at $000101D8<br>
><br>
> Â  $000101D8<br>
><br>
> Â  $00010124<br>
><br>
><br>
> (sid_armel-dchroot)abou@abel:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ fpc -O2 test2 && ./test2<br>
><br>
> Free Pascal Compiler version 3.0.0+dfsg-2 [2016/01/28] for arm<br>
><br>
> Copyright (c) 1993-2015 by Florian Klaempfl and others<br>
><br>
> Target OS: Linux for ARMEL<br>
><br>
> Compiling test2.pas<br>
><br>
> Assembling test<br>
><br>
> Linking test2<br>
><br>
> /usr/bin/ld.bfd: warning: link.res contains output sections; did you forget -T?<br>
><br>
> 4 lines compiled, 0.3 sec<br>
><br>
> Hello<br>
><br>
> (sid_armel-dchroot)abou@abel:~/hedgewars-0.9.22-dfsg/obj-arm-linux-gnueabi/hedgewars$ <br>
><br>
><br>
> Â Looks like PIC code was broken in 3.0. Is there anyone aware of that? How can we fix that?<br>
></p>
<p>Would you please try the current development version of FPC (3.1.1) to check whether the issue persists there?</p>
<p>Regards,<br>
Sven</p>