[fpc-pascal] Linker speed

Tomas Hajny XHajT03 at hajny.biz
Fri Aug 24 12:02:06 CEST 2012


On Fri, August 24, 2012 11:11, Rainer Stratmann wrote:
> Am Friday 24 August 2012 11:00:35 schrieb Tomas Hajny:
>> On Fri, August 24, 2012 10:52, Rainer Stratmann wrote:
>> > I try to be independend from lazarus and wrote a configure file which
>> I
>> > then
>> > pass to fpc at the console.
>> >
>> > Now suddenly the linker is noteable slower.
>> > In both modes (from lazarus and from console).
>> >
>> > Which reason can it have?
>>
>> Which platform and which compiler version is it? Do you use internal or
>> external linker?
>
> Os: Linux
> Compiler Version: 2.4.2-0 i386

That is a pretty old version now (not that this should be the reason of
your issue).


> Sometimes there is the message:
> /urs/bin/ld: warning: link.res contains output sections; did you forget
> -T?
>
> Where can I see and/or configure if an internal or external linker is
> used?
> I assume it is an external linker because of the message (/urs/bin/ld
> ...).

Indeed, it's external (which is your only option for the Linux target
currently). Does your fpc.cfg use smartlinking (-XX)? I could imagine that
smartlinking could slow down things if you haven't used it before (but the
advantage of smartlinking are smaller binaries obviously).

What is the current linking time and rough speed difference compared to
the previous state? Current linking time may get easier to measure if you
use option -s when compiling and adapt the resulting ppas.sh by adding
some timing call before and after the ld invocation.

Tomas





More information about the fpc-pascal mailing list