A patch for binutils (Re: the setrlimit changes in glibc 2.1.3)
H . J . Lu
hjl@lucon.org
Thu Jan 13 12:55:00 GMT 2000
On Thu, Jan 13, 2000 at 12:46:58PM -0800, H . J . Lu wrote:
> > 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.
> >
>
> You are right. Here is the new patch. Please ignore my previous one.
>
Ooops. There is a typo in comment. Here is the fixed one.
H.J.
Index: elflink.h
===================================================================
RCS file: /work/cvs/gnu/binutils/bfd/elflink.h,v
retrieving revision 1.14
retrieving revision 1.18
diff -u -p -r1.14 -r1.18
--- elflink.h 1999/11/01 22:47:51 1.14
+++ elflink.h 2000/01/13 20:52:34 1.18
@@ -1293,7 +1442,13 @@ elf_link_add_object_symbols (abfd, info)
strcpy (newname, name);
p = newname + namelen;
*p++ = ELF_VER_CHR;
- if ((iver.vs_vers & VERSYM_HIDDEN) == 0)
+ /* For the undefined versioned symbol, we always
+ reference the hidden version. The default version
+ will resolve the reference to the hidden one. It
+ solves the problem where a version changes from
+ default to hidden. */
+ if ((iver.vs_vers & VERSYM_HIDDEN) == 0
+ && sym.st_shndx != SHN_UNDEF)
*p++ = ELF_VER_CHR;
strcpy (p, verstr);
More information about the Libc-hacker
mailing list