This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: remove unused symbol and function
- From: Eljay Love-Jensen <eljay at adobe dot com>
- To: Weijun Zhu <zhuw at ucla dot edu>, gcc-help at gcc dot gnu dot org
- Date: Fri, 06 Aug 2004 14:19:03 -0500
- Subject: Re: remove unused symbol and function
- References: <4113D06A.1040801@ucla.edu>
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."