This is the mail archive of the
mailing list for the glibc project.
Re: NEW PATCH: Handle undefined symbol in DSO from DT_NEEDED
"H . J . Lu" <firstname.lastname@example.org> writes:
> > 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:
> > > >
> > > > 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.
But using these DSOs in a development environment that uses glibc 2.1
or above is asking for trouble. We shouldn't encourage people to do
> Here is a new patch for ld. For undefined symbol in a DSO, the dynamic
> linker binds it to a hidden definition if and only if there is only
> one hidden definition. This patch will make ld to do the same, but
> only for DSO from DT_NEEDED. Otherwise, it is a real error.
> If there is no objecttion, I will check it in by Friday.
I strongly object to your patch. The static linker shouldn't look at
DT_NEEDED at all. That it does right now seems convenient to the
user, but it isn't. It makes it possible to create binaries that
don't contain the right dependencies without the user noticing it.
What you're doing looks like fighting the symtoms of a more
fundamental problem, and since you seem to be unable to explain to
what the problem is, I suspect that you have no idea what that
fundamental problem is.