This is the mail archive of the
ecos-discuss@sources.redhat.com
mailing list for the eCos project.
Re: Linker flag : --gc-section
- To: Fabrice Gautier <Fabrice_Gautier at sdesigns dot com>
- Subject: Re: [ECOS] Linker flag : --gc-section
- From: Jonathan Larmour <jlarmour at redhat dot co dot uk>
- Date: Tue, 08 Aug 2000 22:51:32 +0100
- CC: "Ecos-List \(E-mail\)" <ecos-discuss at sourceware dot cygnus dot com>
- Organization: Red Hat UK Ltd.
- References: <21DDE8E5343ED411840A00A0CC334020104824@exchange.sdesigns.com>
Fabrice Gautier wrote:
>
> Hi,
>
> This option is present in the example Makefile and I'm wondering what does
> this ld option does?
>
> I've just noticed that with this option I don't have undefined references
> where I should have ....
It garbage collects unused code and data for any objects compiled with any
of the options "-ffunction-sections -fdata-sections -fvtable-gc".
It only removes code/data that isn't referenced - you should still get
undefined references *if* the function/data the non-existant symbol is
referenced from is present. If the function/data a non-existant symbol is
referenced from isn't present, you won't get any undefined references to
it.
Jifl
--
Red Hat, 35 Cambridge Place, Cambridge, UK. CB2 1NS Tel: +44 (1223) 728762
"Plan to be spontaneous tomorrow." || These opinions are all my own fault