[fpc-devel] assumed bug in the RTL with ARM v5 regarding loadingdynamic libraries

Michael Schnell mschnell at lumino.de
Wed Jan 23 10:50:12 CET 2013


On 01/23/2013 10:00 AM, Yury Sidorov wrote:
> It seems you have libdl statically linked to your executable. 
Is this what
{$linklib c}
does ?

I just copied it from dl.pp in the svn.
> That's why you have such linker errors. Probably the linker is unable 
> to find libdl.so but finds only libdl.a
I can't believe that the linker should automatically search for 
potentially usable dynamic libraries: in fact it does not know on which 
machine the program is supposed to run.
>
> Anyway static linking should work too, but you need to link with libc. 
> If you get segfaults when linking to libc, then cprt0.as for arm-linux 
> is buggy.

I installed the "TAR distribution" of fpc and the libraries, so I assume 
a compiled version of cprt0.as came from same.

the svc version of /linux/arm/cprt0.as contains this

....
         .type   _init,%function
         .type   _fini,%function
         .weak   _init
         .weak   _fini
....

So it does not seem to _require_ the symbols to be provided.

Anyway, there is nothing I can do about cprt0 :-( .

-Michael



More information about the fpc-devel mailing list