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]
Other format: [Raw text]

Re: GCC >= 3 problems


On Wed, Jan 23, 2002 at 08:16:30PM +0100, Maciej W. Rozycki wrote:
> >         * elflink.h (elf_link_check_versioned_symbol): New function.
> >         Return true if there is one hidden definition for the undefined
> >         symbol.
> > 
> >         * elflink.h (elf_link_output_extsym): For undefined symbol in
> >         DSO from DT_NEEDED, Call elf_link_check_versioned_symbol to
> >         check if there is one hidden definition.
> 
>  Well, good enough, to be called a hack or a workaround.  How do you
> assure the semantics of that hidden symbol provides what is expected by
> the reference?  In this specific case of atexit() it doesn't really matter

That is how symbol versioning works. My patch just makes ld to follow
the same rule as ld.so. You can only match the first version of the
symbol with the unversioned reference.

> as the function is never invoked via this specific reference, but this
> cannot be assumed in general.
> 
>  Note that the problem is not specific to libraries linked against glibc
> 2.0.x -- several of glibc 2.2.x libraries do contain unresolved
> (unversioned) atexit() references themselves if compiled by unfixed gcc
> 2.95.x due to the buggy code in crtendS.o. 

Any shared libraries which call atexit will have undefined reference to
atexit when linked against the older glibc, no matter what gcc is used.


H.J.


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