This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
A patch for the unversioned lookup
- To: GNU C Library <libc-alpha at sourceware dot cygnus dot com>
- Subject: A patch for the unversioned lookup
- From: "H . J . Lu" <hjl at lucon dot org>
- Date: Thu, 3 May 2001 15:34:42 -0700
- Cc: Ulrich Drepper <drepper at cygnus dot com>
While working on the atexit related problem, I noticed 2 problems
with the unversioned lookup:
1. The version index starts at 2 not 3. That is we should check
ndx > 1, not ndx > 2, for version names.
2. We should allow the hidden definition if there is no default
definition as long as there is only one definition.
I am also enclosing a testcase here.
H.J.
----
2001-05-03 H.J. Lu <hjl@gnu.org>
* do-lookup.h (FCT): Fix the unversioned lookup against the
nono-default version definition.
--- libc/elf/do-lookup.h.nodef Tue Feb 27 22:22:10 2001
+++ libc/elf/do-lookup.h Thu May 3 14:49:24 2001
@@ -125,11 +125,10 @@ FCT (const char *undef_name, unsigned lo
if (verstab != NULL)
{
ElfW(Half) ndx = verstab[symidx] & 0x7fff;
- if (ndx > 2) /* map->l_versions[ndx].hash != 0) */
+ if (ndx > 1) /* map->l_versions[ndx].hash != 0) */
{
- /* Don't accept hidden symbols. */
- if ((verstab[symidx] & 0x8000) == 0 && num_versions++ == 0)
- /* No version so far. */
+ if (num_versions++ == 0)
+ /* Only one version so far. */
versioned_sym = sym;
continue;
}
Reply-To:
version15.tar.gz