On Thursday, February 11, 2021 at 7:26:46 PM UTC-8, Siri Cruise wrote:
In article
<[email protected]>,
Rainer Weikusat <[email protected]> wrote:
That's the GNU binutils linker and changing the default behaviour would probably break backwards-compatibility.
I don't see how. Modern machines have enough memory to put
definitions in a hash table by name and object file. If the
library name is repeated, a double indexing allows the previous
definitions to be deleted as the new object definitions are
loaded. I have no pity anyone using load order for such esoteric
reasons that that would still break.
I started unices in 1980. I appreciated at the time why ld had to
be stupid. I didn't expect people demand ld remain stupid when vm
broke the 65KB and then 4MB boundaries.
"History and economics matter"
I assume I'm mistaken in part of this, but I believe that binutils ld exists because Cygnus needed a linker and had (created) the paying market of developers for embedded CPUs to support the core development; porting to the commercial unices was a stream
of contributions on top of that, but the base exists because there were enough companies who could spend less by paying Cygnus to provide the common work.
The second linker, gold, exists because a single company (Google) had resources to spare and saw a benefit worth the cost, to the point that I have heard that for some period of time (and still?) Chrome on { Android, Linux } could only be linked with
gold and not with binutils ld because it's Just Too Big.
However, gold is *not* a 100% replacement for binutils ld. both because of what might be called "differences in implementation defined behavior" (for the targets it supports) and because the latter supports _many_ more targets. The former means that
making it the default would cause stuff to break which worked before and thus cost OS integrator effort, while the latter meant that no matter how much effort was spent on that you could never drop binutils ld. As an OS integrator, if you'll always have
to deal with binutils ld then why waste time on gold? Let that cost be carried by the software projects which required it.
The third linker, lld in the llvm project, again seems to exist because a company had needs not met by binutils ld (license, performance, support for execute-only-memory, whatever) and funded it and then the developers found an umbrella (llvm project)
under which that could be shared and become a more inclusive community. Unlike gold, the differences from binutils ld (licence, performance, etc) where substantial enough for at least some OS integrators to get behind it and help build its community.
But still, it hasn't killed binutils ld because it is not a complete replacement.
Meanwhile, for the majority of developers NONE OF THIS MATTERS. Most developers never do anything big enough or complex enough for the linker to matter enough for them to spend any time arguing for a faster linker, particularly if there are others
arguing against that for reasons of license ("politics"), compatibility, or disenfranchisement (platform support). When concentrated costs are weighed against diverse benefits (or concentrated benefits vs diverse costs), the concentrated forces tend to
win because it _matters_ to them.
So, we all have to deal with a sucky default linker on Linux because the groups that benefit from binutils being the default are concentrated while very few of the rest of us suffer enough to spend effort fighting about it.
Philip Guenther
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)