Usage of the "-O" flag to ld

Erik Leunissen e.leunissen@hccnet.nl
Sun Jul 9 13:25:00 GMT 2006


What values are useful with the "-O" flag? The ld manual says that the 
number must be > 0. That leaves some room for variation ;-)

But seriously, I tried -O99, which was taken without complaint by the 
linker and did not produce any errors at runtime. However, I'm confident 
that the sky is not the limit here, and that "99" and "98" probably are 
indiscriminate w.r.t. the effect they resort.

A related question: is there any documentation that explains what kind 
of optimizations the linker performs (in contrast to optimizations 
performed by the compiler)?


Thanks for any help/pointers,

Erik Leunissen



More information about the Binutils mailing list