This is the mail archive of the
binutils@sources.redhat.com
mailing list for the binutils project.
Re: PATCH: Handle undefined symbol in DSO from DT_NEEDED
- To: "H . J . Lu" <hjl at lucon dot org>
- Subject: Re: PATCH: Handle undefined symbol in DSO from DT_NEEDED
- From: Jakub Jelinek <jakub at redhat dot com>
- Date: Wed, 9 May 2001 11:36:37 +0200
- Cc: Ulrich Drepper <drepper at cygnus dot com>, binutils at sourceware dot cygnus dot com, libc-alpha at sources dot redhat dot com
- References: <20010508210253.A11993@lucon.org> <m366fb87y1.fsf@otr.mynet> <20010508213054.A12522@lucon.org>
- Reply-To: Jakub Jelinek <jakub at redhat dot com>
On Tue, May 08, 2001 at 09:30:54PM -0700, H . J . Lu wrote:
> On Tue, May 08, 2001 at 09:25:42PM -0700, Ulrich Drepper wrote:
> > "H . J . Lu" <hjl@lucon.org> writes:
> >
> > > glibc 2.2.3 changes atexit from default to hidden. DSOs with
> > > unversioned references to atexit fail to link if they are loaded
> > > in via a DT_NEEDED entry. This patch makes it non-fatal. I will
> > > check it in if I don't hear any objections by Thursday.
> >
> > Why should the linker ignore bugs? Don't work around problems users
> > introduced. Make them fix their code.
> >
>
> DSOs compiled against glibc 2.0 may have unversioned references to
> atexit. I won't blame people for compiling DSOs against glibc 2.0.
Are you sure it does not work or is it just a guess?
I've just compiled a program using atexit on a glibc 2.0.7 system (RHL 5.2),
plus a program using shared library which uses atexit on the same box, moved
them to glibc 2.2.3 box (both the program and DSO have unversioned atexit
reference, glibc has atexit@GLIBC_2.0 only) and they work very well.
Anyway, if you show me a testcase which would not work, then I should put
atexit into /lib/libNoVersion-2.2.3.so, it should not
bloat things elsewhere. libNoVersion is needed to run glibc 2.0 programs
anyway (at least for the vast majority of binary only apps).
Jakub