PATCH: Fix hidden vs. versioned symbol

H. J. Lu hjl@lucon.org
Thu May 8 19:23:00 GMT 2003


On Thu, May 08, 2003 at 11:51:22AM -0700, H. J. Lu wrote:
> On Thu, May 08, 2003 at 09:55:12AM -0400, Harris, Jeff wrote:
> > I am having difficulties trying to create a test case other than the -lc
> > linking on ppc.
> > 
> > I do have more information regarding the symbols that were generated which
> > may shed some more light.  The output of nm on the shared library
> > (optionally linked against libc) and the exe (linked against the shared
> > library) show different symbol types for the __muldf3 symbol.  The four
> > cases I have are old/new binutils and with/without linking to -lc.
> > 
> 
> I found a testcase:
> 

Here is the patch I will check in. I will check in a testcase first.


H.J.
-------------- next part --------------
2003-05-08  H.J. Lu <hongjiu.lu@intel.com>

	* elflink.h (elf_add_default_symbol): After skipping the
	unversioned symbol, go to non-default one.

--- bfd/elflink.h.hjl	2003-05-07 22:19:10.000000000 -0700
+++ bfd/elflink.h	2003-05-08 12:17:30.000000000 -0700
@@ -1108,7 +1108,7 @@ elf_add_default_symbol (abfd, info, h, n
     return FALSE;
 
   if (skip)
-    return TRUE;
+    goto nondefault;
 
   if (! override)
     {
@@ -1203,6 +1203,7 @@ elf_add_default_symbol (abfd, info, h, n
   /* We also need to define an indirection from the nondefault version
      of the symbol.  */
 
+nondefault:
   len = strlen (name);
   shortname = bfd_hash_allocate (&info->hash->table, len);
   if (shortname == NULL)


More information about the Binutils mailing list