PATCH: Handle undefined symbol in DSO from DT_NEEDED

Jakub Jelinek jakub@redhat.com
Wed May 9 02:33:00 GMT 2001


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



More information about the Binutils mailing list