Sign in Join

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

Mailing lists / fpc-pascal / 2016-11

Other linkers support

10 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

denisgolovan

Hi all

Could anybody provide some information on support for LLD and/or gold linker? Linker phase becomes a bottleneck for me.

Last time I tried, ld scripts generated by fpc caused some errors on gold linker. Are there any plans for support anything else besides standard ld?

Regards, Denis Golovan
Jonas Maebe
to denisgolovan

denisgolovan wrote on Fri, 18 Nov 2016:

Last time I tried, ld scripts generated by fpc caused some errors on gold linker. Are there any plans for support anything else besides standard ld?

Gold and lld are supposed to be compatible with GNU ld (bar ancient stuff that is no longer relevant current platforms). If you get errors, please report bugs against these other linkers.

If you are under Linux, make sure to first check with FPC trunk though, because the "did you forget -T" warnings from ld have been fixed there, and these warnings indicated that FPC was relying on undefined behaviour of the linker.

Jonas

Jonas Maebe
to fredvs

fredvs wrote on Fri, 18 Nov 2016:

What linker is used for Windows ?

FPC has a built-in linker for Windows.

Does it exist some (dis)advantage(s) to use Gold or lld vs ld in Unix systems ?

Gold and lld are generally faster than ld.

Jonas

Jonas Maebe
to fredvs

fredvs wrote on Fri, 18 Nov 2016:

> FPC has a built-in linker for Windows. Ha, I understand now why fpc-Windows creates perfect binaries. ;-)

And why it is currently broken when used with object files generated by newer gcc versions: http://bugs.freepascal.org/view.php?id=30614

Hum, is there plan for a "pure fpc unix linker" ?

There is no such thing as a "unix linker: different unix platforms use different object formats, and hence need separate linker support (just like you need separate linker support for Windows and Linux). Some people have worked on ELF (ELF is the object format used by Linux and recent *BSD versions) linker support support from time to time, but that work is not finished.

Jonas

denisgolovan
to Jonas Maebe: denisgolovan wrote on Fri, 18 Nov 2016: Gold and lld are supposed to be compatible with…

Ok.
See http://bugs.freepascal.org/view.php?id=30956 then.

18.11.2016, 13:00, "Jonas Maebe" :

Show quoted text 19 lines
denisgolovan wrote on Fri, 18 Nov 2016: >  Last time I tried, ld scripts generated by fpc caused some errors on >  gold linker. >  Are there any plans for support anything else besides standard ld? Gold and lld are supposed to be compatible with GNU ld (bar ancient stuff that is no longer relevant current platforms). If you get errors, please report bugs against these other linkers. If you are under Linux, make sure to first check with FPC trunk though, because the "did you forget -T" warnings from ld have been fixed there, and these warnings indicated that FPC was relying on undefined behaviour of the linker. Jonas _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Regards, Denis Golovan
Jonas Maebe
to denisgolovan
denisgolovan wrote 12 lines
18.11.2016, 13:00, "Jonas Maebe" : > denisgolovan wrote on Fri, 18 Nov 2016: > >> Last time I tried, ld scripts generated by fpc caused some errors on >> gold linker. >> Are there any plans for support anything else besides standard ld? > Gold and lld are supposed to be compatible with GNU ld (bar ancient > stuff that is no longer relevant current platforms). If you get > errors, please report bugs against these other linkers. Ok. See http://bugs.freepascal.org/view.php?id=30956 then.

With "report a bug against these other linkers" I meant "report a bug to the project that develops those linkers". The reason is that they are supposed to be drop-in replacements for GNU/BFD ld, so any incompatibility is a bug/missing feature in their implementation.

Jonas

denisgolovan
to Jonas Maebe

I've received an answer to my reported bug
https://sourceware.org/bugzilla/show_bug.cgi?id=20870

Could anyone from FPC team comment anything there?

19.11.2016, 14:53, "Jonas Maebe" :

Show quoted text 24 lines
denisgolovan wrote: >  18.11.2016, 13:00, "Jonas Maebe" : >>  denisgolovan wrote on Fri, 18 Nov 2016: >> >>>   Last time I tried, ld scripts generated by fpc caused some errors on >>>   gold linker. >>>   Are there any plans for support anything else besides standard ld? >>  Gold and lld are supposed to be compatible with GNU ld (bar ancient >>  stuff that is no longer relevant current platforms). If you get >>  errors, please report bugs against these other linkers. > >  Ok. >  See http://bugs.freepascal.org/view.php?id=30956 then. With "report a bug against these other linkers" I meant "report a bug to the project that develops those linkers". The reason is that they are supposed to be drop-in replacements for GNU/BFD ld, so any incompatibility is a bug/missing feature in their implementation. Jonas _______________________________________________ fpc-pascal maillist - http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Regards, Denis Golovan