--as-needed and GNU ld linker

Francesco Montorsi f18m_cpp217828@yahoo.it
Mon Nov 20 14:35:00 GMT 2006


Hi all,

     I've found that I can *greatly* improve the binary compatibility of 
my programs on Linux using --Wl,--as-needed option with GCC when running 
the GNU ld linker (great feature - many thanks!).

However I wonder: why not make --as-needed the default behaviour of ld ?
For some sort backward compatibility?

I'd think that making --as-needed the default would greatly improve the 
compatibility of the linux programs distributed by a lot of developers 
(since very few of them know about --as-needed, unfortunately)... and 
this would turn in a more user-friendly experience for Linux users.

Thanks and keep up the good work!
Francesco Montorsi





More information about the Binutils mailing list