[fpc-pascal] Issue with Linking
Henry Vermaak
henry.vermaak at gmail.com
Thu Aug 20 16:15:06 CEST 2015
On Thu, Aug 20, 2015 at 07:03:11AM -0700, Chris Moody wrote:
> Assembling dentist
> Linking Dentist
> /usr/bin/ld: warning: link.res contains output sections; did you forget -T?
> /home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In
> function `_haltproc_eabi':
> (.text+0x88): undefined reference to `_fini'
> /home/pi/fpc-2.6.4/lib/fpc/2.6.4/units/arm-linux/rtl/cprt0.o: In
> function `_haltproc_eabi':
> (.text+0x90): undefined reference to `_init'
> Dentist.pas(106) Error: Error while linking
> Dentist.pas(106) Fatal: There were 1 errors compiling module, stopping
> Fatal: Compilation aborted
> Error: /usr/bin/ppcarm returned an error exitcode
>
> That is the result of: fpc Dentist.pas -Fusource/lib
> -Fu/usr/lib/fpc/2.6.4/units/arm-linux
Those symbols (_fini and _init) are defined in crti.o. Try `locate
crti.o`, you'll get something like /usr/lib/{arch-triplet}/crti.o. Add
this directory to your fpc options with -Fl. E.g. fpc
-Fl/usr/lib/arm-linux-gnueabi
Henry
More information about the fpc-pascal
mailing list