This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: dead function elimination
- From: jimmy <jimmyb at huawei dot com>
- To: Nick Clifton <nickc at redhat dot com>
- Cc: binutils at sourceware dot org, gcc-help at gcc dot gnu dot org
- Date: Wed, 20 Dec 2006 13:25:28 +0530
- Subject: Re: dead function elimination
- References: <4552DE07.5050702@huawei.com> <4552EB64.20000@redhat.com> <4552F092.7020405@huawei.com> <4559B37E.5070405@redhat.com> <4586503E.3010108@huawei.com> <45873BC6.8060102@redhat.com>
Nick Clifton wrote:
Hi Jimmy,
If i understand things correctly, there is a restriction on
'--gc-sections' that it doesn't work if the link is dynamic. What if
my scenario is like this:
libsomething.a - some static library built with
-ffunction-sections & -fdata-sections
src.o - my source code also built with -ffucntion-sections
final step:
ld -o exec --gc-sections src.o -lsomething
In the above step, ld simply says
'/usr/bin/ld: Warning: gc-sections option ignored'
Hmm, interesting. I had thought that this would work. I will have to
look into it when I get from vacation. Are you using the most up to
date version of the linker sources ?
Cheers
Nick
binutils-2.17 is able to do it! thank you for the help.
-jb
--
mathematician, n.:
Some one who believes imaginary things appear right before your
i's.