This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


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

Re: Linker flag : --gc-section


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

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