This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: remove unused symbol and function


Hi Weijun,

You could try -ffunction-sections, -fdata-sections, and -gc-sections
(garbage collect unused sections).

May or may not work, and could be platform dependent as to how well they
work.

You're better off not including the unused foo1 which depends on
unresolveable foo2 in the first place.

Another hack would be to define a (spoofed and also unused) foo2.  That'd
make foo1 happy.

HTH,
--Eljay

"Don't anthropomorphize computers.  They hate it when you do that."


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]