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