A patch for binutils (Re: the setrlimit changes in glibc 2.1.3)
Ian Lance Taylor
ian@zembu.com
Thu Jan 13 12:21:00 GMT 2000
Date: Thu, 13 Jan 2000 11:23:31 -0800
From: "H . J . Lu" <hjl@lucon.org>
Thanks. Here is a patch for binutils 2.9.5.0.22. Ian, what do you
think?
Thu Jan 13 11:03:29 2000 H.J. Lu <hjl@gnu.org>
* elflink.h (elf_link_add_object_symbols): Bound the external
references to the default version to the hidden version.
There is something odd about this case. libtest.so has an external
reference to symbol foo in version FOO_1.0. Why are we looking up
foo@@FOO_1.0? Why aren't we looking up foo@FOO_1.0? If I understand
your patch, the latter is defined while the former is not. That also
matches my intuition.
We use the double @ to indicate the default version of a symbol. But
that is only applicable to a definition. It does not make sense to
refer to the default version of a symbol and to simultaneously specify
a specific version. When we do use the double @, we also set up a
reference from the unqualified symbol name, and from the symbol name
with a single @.
So I suspect that your patch, which sets up an indirection from
foo@@FOO_1.0 to foo@FOO_1.0, is fixing the wrong thing. We should be
asking why there would ever be a reference to foo@@FOO_1.0.
Perhaps the fix is as simple as changing the code to not add a second
ELF_VER_CHR if sym.st_shndx is SHN_UNDEF.
Ian
More information about the Libc-hacker
mailing list