This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


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

Re: Versioning mess proved!!!


Geoff Keating <geoffk@cygnus.com> writes:

> The test must be done when the data reference is resolved.  If the
> data reference would be resolved to a PLT entry, and the data
> reference is weak, then it must be checked that there is a real
> definition somewhere as well as the PLT entry.  I think this will be
> easy to fit into the current do-lookup logic without any significant
> performance impact.

But this will impact programs which expect lazy relocation.  Imagine a
program running dlopen() with RTLD_GLOBAL to satisfy such a undefined
reference.

I'm not really sure whether we should try to work on these things.
Clearly the compatibility issue on PPC must be resolved but the weak
handling should perhaps not be touched.  To solve the PPC issue we
have to get rid of the PLT entry.  There should be only the data
relocation.  And this is where the x86 is different since here we
don't have a PLT entry.  Can we add some magic perhaps with a no-op
asm to trick gcc into believing that the function pointer might be
modified?

Programs have the opportunity to use

	dlsym (RTLD_DEFAULT, "foo")

to test for the availability of symbol "foo".  The current weak
handling hasn't provoked any complains but upsetting the status quo
might do just that.

-- 
---------------.                          ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Red Hat          `--' drepper at redhat.com   `------------------------

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