[fpc-pascal] ppcrossarm 220

Florian Klaempfl florian at freepascal.org
Thu Nov 8 10:14:28 CET 2007


Carsten Bager schrieb:
> I have built a Win32 ppcrossarm.exe (2.20) compiler. The compiler works 
> ok. The output from the Linux and the Win32 compiler when I use the -sh 
> directive is exactly the same. The downside is I have some problems 
> finding a Win32 linker that I can use.
> 
> If I compile a Hallow World program, it works ok, but when I try to compile a 
> program that uses uLibc, the Win32 linker and the Linux linker dos not do 
> exactly the same. 
> 
> When I run the output from the Win32 linker on my arm platform it stops 
> with
> Segmentation fault

Did you load it in GDB? Where does it exactly crash?

> The output from the Linux linker runs ok
> 
> If I look in the map file the only difference I can see is (see at the end of this mail)
> 
> Linux:   0x000080d4                . = (0x8000 + SIZEOF_HEADERS)
> Win32:  0x00008000                . = 0x8000
> 
> I have several versions of Win32 linkers (215,216,217)  and Linux linkers 
> (215,216,217,218). I have also seen this problem with a Linux linker (217)
> 
> One of the Win32 linkers I have used if from 
> ftp://ftp.freepascal.org/pub/fpc/contrib/cross/mingw/binutils-2.15.94-win32-
> arm-linux.zip

I guess it is linker script related. Unfortunatly FPC comes with an
integrated linker script however it seems there is no generic one.

Try to compare the various linker scripts to narrow it down. From ld you
get it with
ld --verbose
>From FPC you get it when compiling with -s:
it's the SECTIONS { ... }part of the resulting link.res



More information about the fpc-pascal mailing list