RFC: Should the linker support '--fast' and if so, what should it do ?

Jan Beulich jbeulich@suse.com
Thu Mar 19 08:42:58 GMT 2026


On 18.03.2026 12:38, Nick Clifton wrote:
> Hi Guys,
> 
>   OK, this one is probably going to be controversial...
> 
>   I was wondering whether it would be useful to have a linker command
>   line option to request a fast link, even if the results are not as
>   good as a normal link.  In particular it occurred to me the merging
>   string sections (and other mergeable sections) is not actually
>   required by the ELF standard.  So if we skip that step quite a lot of
>   time can be saved.  In my tests for example I saw time savings of
>   around 20% for big links.  Of course the resulting executables are
>   unnecessarily large and probably a bit slower than their merged
>   equivalents, but for test builds during a development process this
>   might not be an issue.
> 
>   So - am I going mad here or is this something worth looking into ?

Well, if there's a use for this (and you name one), then why not if you
can afford the time to implement this. Nobody has to use the new option.
Whether, as Fangrui suggests, to utilize -O I'm less certain. That
might affect people who may prefer to remain unaffected.

Jan


More information about the Binutils mailing list