Other linkers support

classic Classic list List threaded Threaded
10 messages Options
Reply | Threaded
Open this post in threaded view
|

Other linkers support

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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Other linkers support

Jonas Maebe-2

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  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Other linkers support

fredvs
Hello.

What linker is used for Windows ?

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

Thanks.

Fre;D
Many thanks ;-)
Reply | Threaded
Open this post in threaded view
|

Re: Other linkers support

Jonas Maebe-2

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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Other linkers support

fredvs
> FPC has a built-in linker for Windows.

Ha, I understand now why fpc-Windows creates perfect binaries. ;-)

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

Thanks.

Fre;D
Many thanks ;-)
Reply | Threaded
Open this post in threaded view
|

Re: Other linkers support

Jonas Maebe-2

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
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Other linkers support

fredvs
Thanks Jonas for your bright light.

Fre;D
Many thanks ;-)
Reply | Threaded
Open this post in threaded view
|

Re: Other linkers support

denisgolovan
In reply to this post by Jonas Maebe-2
Ok.
See http://bugs.freepascal.org/view.php?id=30956 then.


18.11.2016, 13:00, "Jonas Maebe" <[hidden email]>:

> 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 - [hidden email]
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

--
Regards,
Denis Golovan
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Other linkers support

Jonas Maebe-2
denisgolovan wrote:

> 18.11.2016, 13:00, "Jonas Maebe" <[hidden email]>:
>> 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  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal
Reply | Threaded
Open this post in threaded view
|

Re: Other linkers support

denisgolovan
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" <[hidden email]>:

> denisgolovan wrote:
>
>>  18.11.2016, 13:00, "Jonas Maebe" <[hidden email]>:
>>>  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 - [hidden email]
> http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

--
Regards,
Denis Golovan
_______________________________________________
fpc-pascal maillist  -  [hidden email]
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal