This is the mail archive of the binutils@sources.redhat.com mailing list for the binutils project.


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

Re: --gc-sections and C library linkage issues (?)


On 24 Aug 2000, Ulrich Drepper wrote:

> Benjamin Kosnik <bkoz@redhat.com> writes:
> 
> > deal, ie something like this needs to be added to the linker script:
> > 
> > .__libc_subinit : { KEEP (*(.__libc_subinit)) }
> 
> We have several different sections like this.  You are fixing a
> symptom.  IMO --gc-sections should not be used until it can be
> properly implemented.

--gc-sections discards a section which isn't referenced via any of
it's symbols.  That seems quite a proper implementation.  The problem
really is that glibc doesn't make such a symbol reference.  You should be
able to do this with a reference to the section symbol from any section
that you know will escape garbage collection.

Hmm, I suppose it would be nice if you could tell the assembler to keep 
a section via a section attribute.  If you would like to suggest
semantics, I'll implement it.

Alan Modra
-- 
Linuxcare.  Support for the Revolution.


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