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

Jan Beulich jbeulich@suse.com
Thu Apr 2 05:46:55 GMT 2026


On 02.04.2026 02:58, Hans-Peter Nilsson wrote:
> 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.
> 
> 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.

Nick's patch doesn't alter the "required_argument" attribute of O's
entry in the option table. Hence I don't think behavior without
argument will change - it continues to be invalid.

Jan


More information about the Binutils mailing list