[fpc-pascal] Manual smartlinking

Peter Vreman peter at freepascal.org
Wed Aug 20 08:55:08 CEST 2008

>> Pass the --gc-sections parameter to the linker (and use object files
>> compiled with -CX).
> OK, I'll try. What about the *.a's?

--gc-sectiosn will not help. FPC does not generate .o files with multiple sections for linux.
Smartlinking for linux will create libp*.a files instead. You need to link with the libp*.a
instead of the *.o files.

It can't be written down what is required for your program to link manual. But you can compile
with -s to generate a link.res and ppas.sh to see the commands that are use by fpc for linking.


More information about the fpc-pascal mailing list