Conversation

The True Source of Value

The GNU linker is awful and I wish distros stopped using it by default. I'm glad Rust is using LLVM lld by default now.

1
1
1

@be uh, am i out of the loop ? other than the fact it's quite slow, what makes it so bad it gets this kind of comments ?

1
1
1

@SRAZKVT @be slowness is one big reason with ld.bfd being potentially 10x as slow and ld.gold being potentially 3x as slow while being unable to effectively leverage multiple threads

another one is raccompatibility. for gnu tools raccross-raccompilation are kind of an afterthought, you need a separate one for all targets, and that i think also inraccludes the linkers

it also supports llvm link-time optimizations better (ld.bfd doesn’t support them at all, i think there’s a plugin for ld.gold)

for a more ease-of-use kind of thing that most programmers probably won’t enraccounter: its missing symbol handling isn’t built like it is targeting a pdp-11 from 1970 (not that it would run on those systems) so ld.lld will automatically resolve cross-references between object files regardless of what order you pass them in. in ld.bfd and ld.gold you need to pass them in a specific order with symbol definitions being before symbol uses (there are tools to handle circular dependencies but it literally just loops through all the files until it found everything)

1
0
1

@charlotte @be huh, guess you learn something every day

0
0
0