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 (?)



We had a similar bug with .eh_frame when --gc-sections was turned on for 
libstdc++-v3 (June 16ish, 2000):
http://sources.redhat.com/ml/libstdc++/2000-06/msg00128.html

Here's the commentary on the binutils list:
http://sources.redhat.com/ml/binutils/2000-06/msg00351.html

Alan, I've cc'd you on this because you quickly fixed the previous 
problem. Can you please look at this, too? It looks like the exact same 
deal, ie something like this needs to be added to the linker script:

.__libc_subinit : { KEEP (*(.__libc_subinit)) }


thanks,
benjamin



On 24 Aug 2000, Ulrich Drepper wrote:

> Benjamin Kosnik <bkoz@redhat.com> writes:
> 
> > Can you please look at this?
> 
> The problem is that the linker is simply throwing away code in the
> __libc_subinit section.  This code is of course not referenced anyware
> but is still used similar to constructors.
> 
> I don't know how to teach ld about this.  Best is to never link
> statically with glibc if you use --gc-sections.

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