Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2012-08

Linker speed

6 messages · 3 people ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Rainer Stratmann

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?

Reply by email

Tomas Hajny
to Rainer Stratmann
Rainer Stratmann wrote 8 lines
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?

Tomas

Reply by email

Rainer Stratmann
to Tomas Hajny
Tomas Hajny wrote 12 lines
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

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 ...).

Reply by email

Graeme Geldenhuys
to Rainer Stratmann
Rainer Stratmann wrote
Sometimes there is the message: /urs/bin/ld: warning: link.res contains output sections; did you forget -T?

The latest FPC under Linux now always produces this message. Search the message archives... I asked this question before and somebody explained what is causing it, but basically nothing really to worry about. Though I must admit, I don't like such message either. :)

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 ...).

Linux doesn't have an internal linker, so it that case it is always external. Only FPC under Windows has an internal linker as far as I know.

Regards, - Graeme - _______________________________________________ fpGUI - a cross-platform Free Pascal GUI toolkit http://fpgui.sourceforge.net

Reply by email

Tomas Hajny
to Rainer Stratmann: Os: Linux Compiler Version: 2.4.2-0 i386 Sometimes there is the message: /urs/bin/ld:…
Rainer Stratmann wrote 17 lines
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).

Show quoted text 8 lines
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

Reply by email

Rainer Stratmann
to Tomas Hajny
Tomas Hajny wrote
> Compiler Version: 2.4.2-0 i386 That is a pretty old version now (not that this should be the reason of your issue).

It was ok with the same version :-)
I am satisfied with 2.4.2-0.

Does your fpc.cfg use smartlinking (-XX)?

Yes.

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).

Yes, it was the reason, thanks!
I did not deselect external configuration file in the project settings. So I was not aware that the switch was set there...

What is the current linking time and rough speed difference compared to the previous state?

0.1ms to 0.6ms (I have an i7-3770S).

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.

Lazarus shows the time and I can feel that it is slower in comparison to before.

Reply by email