remove unused symbol and function

Weijun Zhu zhuw@ucla.edu
Fri Aug 6 19:27:00 GMT 2004


Hello,

A function (say foo1) in an object file calls a library function (say 
foo2). The library does not exist on the system.
foo1 is not called in the target that I am building. But the GCC gives 
me an error that
undefined reference to foo2 while linking?

Is there a way to avoid linking unused symbols?

Weijun.




More information about the Gcc-help mailing list