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

Hans-Peter Nilsson hp@bitrange.com
Thu Apr 2 00:58:29 GMT 2026


On Wed, 1 Apr 2026, Nick Clifton wrote:
> It does not change the linker's use of -O <N> where N is a positive integer
> greater than zero.  But is does add "-O 0" to disable merging and "-O -" to
> restore the linker's default behaviour.  (I doubt that this will ever be used
> but it is always best to have a means of restoring the default).  In addition
> "-O <text>" will now trigger an error from the linker.
> 
> What do you think ?
> 
> Cheers
>   Nick


Please consider that users (like me) would likely try using 
gcc-style contraction, so "-O0" and "-O1" should have no 
functional change: still be as valid or invalid as before your 
suggested change.  A change that (otherwise) sounds good, I 
should add.

It sounds like "-O" by itself (not followed by a separate "0") 
will have a "functional change", but also like it's already 
generally invalid.

Come to think of it, it'd be helpful to point out this 
difference to gcc-"-O" in the documentation.

brgds, H-P


More information about the Binutils mailing list