OSDN Git Service

* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
authorAlan Modra <amodra@bigpond.net.au>
Wed, 5 Feb 2003 15:49:04 +0000 (15:49 +0000)
committerAlan Modra <amodra@bigpond.net.au>
Wed, 5 Feb 2003 15:49:04 +0000 (15:49 +0000)
plt info when called to transfer weak sym info.

bfd/ChangeLog
bfd/elf64-ppc.c

index b1a2d67..085ae78 100644 (file)
@@ -1,3 +1,8 @@
+2003-02-06  Alan Modra  <amodra@bigpond.net.au>
+
+       * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Don't copy got and
+       plt info when called to transfer weak sym info.
+
 2003-02-05  Alan Modra  <amodra@bigpond.net.au>
 
        * reloc.c: Add PPC and PPC64 TLS relocs.
index 2634006..b86bb85 100644 (file)
@@ -3286,7 +3286,24 @@ ppc64_elf_copy_indirect_symbol (bed, dir, ind)
       eind->dyn_relocs = NULL;
     }
 
-  /* Do the same for got entries.  */
+  edir->is_func |= eind->is_func;
+  edir->is_func_descriptor |= eind->is_func_descriptor;
+  edir->is_entry |= eind->is_entry;
+
+  /* Copy down any references that we may have already seen to the
+     symbol which just became indirect.  */
+  edir->elf.elf_link_hash_flags |=
+    (eind->elf.elf_link_hash_flags
+     & (ELF_LINK_HASH_REF_DYNAMIC
+       | ELF_LINK_HASH_REF_REGULAR
+       | ELF_LINK_HASH_REF_REGULAR_NONWEAK
+       | ELF_LINK_NON_GOT_REF));
+
+  /* If we were called to copy over info for a weak sym, that's all.  */
+  if (eind->elf.root.type != bfd_link_hash_indirect)
+    return;
+
+  /* Copy over got entries.  */
   if (eind->elf.got.glist != NULL)
     {
       if (edir->elf.got.glist != NULL)
@@ -3345,22 +3362,6 @@ ppc64_elf_copy_indirect_symbol (bed, dir, ind)
       eind->elf.plt.plist = NULL;
     }
 
-  edir->is_func |= eind->is_func;
-  edir->is_func_descriptor |= eind->is_func_descriptor;
-  edir->is_entry |= eind->is_entry;
-
-  /* Copy down any references that we may have already seen to the
-     symbol which just became indirect.  */
-  edir->elf.elf_link_hash_flags |=
-    (eind->elf.elf_link_hash_flags
-     & (ELF_LINK_HASH_REF_DYNAMIC
-       | ELF_LINK_HASH_REF_REGULAR
-       | ELF_LINK_HASH_REF_REGULAR_NONWEAK
-       | ELF_LINK_NON_GOT_REF));
-
-  if (eind->elf.root.type != bfd_link_hash_indirect)
-    return;
-
   if (edir->elf.dynindx == -1)
     {
       edir->elf.dynindx = eind->elf.dynindx;