* elf.c (_bfd_elf_link_hash_copy_indirect): Copy
authorDaniel Jacobowitz <drow@false.org>
Mon, 17 Nov 2003 21:31:11 +0000 (21:31 +0000)
committerDaniel Jacobowitz <drow@false.org>
Mon, 17 Nov 2003 21:31:11 +0000 (21:31 +0000)
ELF_LINK_HASH_NEEDS_PLT.  Fix formatting.
* elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
* elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
* elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
* elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
* elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
* elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
* elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
* elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
* elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
* elf32-xtensa.c (elf_xtensa_copy_indirect_symbol): Remove.
(elf_backend_copy_indirect_symbol): Don't define.

12 files changed:
bfd/ChangeLog
bfd/elf.c
bfd/elf32-hppa.c
bfd/elf32-i386.c
bfd/elf32-ppc.c
bfd/elf32-s390.c
bfd/elf32-sh.c
bfd/elf32-xtensa.c
bfd/elf64-ppc.c
bfd/elf64-s390.c
bfd/elf64-x86-64.c
bfd/elfxx-ia64.c

index 63fd6fc..d3e8bfb 100644 (file)
@@ -1,3 +1,19 @@
+2003-11-17  Daniel Jacobowitz  <drow@mvista.com>
+
+       * elf.c (_bfd_elf_link_hash_copy_indirect): Copy
+       ELF_LINK_HASH_NEEDS_PLT.  Fix formatting.
+       * elf32-hppa.c (elf32_hppa_copy_indirect_symbol): Likewise.
+       * elf32-i386.c (elf_i386_copy_indirect_symbol): Likewise.
+       * elf32-ppc.c (ppc_elf_copy_indirect_symbol): Likewise.
+       * elf32-s390.c (elf_s390_copy_indirect_symbol): Likewise.
+       * elf32-sh.c (sh_elf_copy_indirect_symbol): Likewise.
+       * elf64-ppc.c (ppc64_elf_copy_indirect_symbol): Likewise.
+       * elf64-s390.c (elf_s390_copy_indirect_symbol): Likewise.
+       * elf64-x86-64.c (elf64_x86_64_copy_indirect_symbol): Likewise.
+       * elfxx-ia64.c (elfNN_ia64_hash_copy_indirect): Likewise.
+       * elf32-xtensa.c (elf_xtensa_copy_indirect_symbol): Remove.
+       (elf_backend_copy_indirect_symbol): Don't define.
+
 2003-11-14  Daniel Jacobowitz  <drow@mvista.com>
 
        * elfxx-mips.c (mips_elf_merge_gots): Weaken assert for local
index e008cb7..e6965af 100644 (file)
--- a/bfd/elf.c
+++ b/bfd/elf.c
@@ -1354,12 +1354,12 @@ _bfd_elf_link_hash_copy_indirect (const struct elf_backend_data *bed,
   /* Copy down any references that we may have already seen to the
      symbol which just became indirect.  */
 
-  dir->elf_link_hash_flags |=
-    (ind->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));
+  dir->elf_link_hash_flags
+    |= (ind->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
+                                   | ELF_LINK_HASH_NEEDS_PLT));
 
   if (ind->root.type != bfd_link_hash_indirect)
     return;
index c2e2f70..51f070d 100644 (file)
@@ -1018,7 +1018,8 @@ elf32_hppa_copy_indirect_symbol (const struct elf_backend_data *bed,
     dir->elf_link_hash_flags |=
       (ind->elf_link_hash_flags & (ELF_LINK_HASH_REF_DYNAMIC
                                   | ELF_LINK_HASH_REF_REGULAR
-                                  | ELF_LINK_HASH_REF_REGULAR_NONWEAK));
+                                  | ELF_LINK_HASH_REF_REGULAR_NONWEAK
+                                  | ELF_LINK_HASH_NEEDS_PLT));
   else
     _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
 }
index ff8aab4..9814543 100644 (file)
@@ -770,7 +770,8 @@ elf_i386_copy_indirect_symbol (const struct elf_backend_data *bed,
     dir->elf_link_hash_flags |=
       (ind->elf_link_hash_flags & (ELF_LINK_HASH_REF_DYNAMIC
                                   | ELF_LINK_HASH_REF_REGULAR
-                                  | ELF_LINK_HASH_REF_REGULAR_NONWEAK));
+                                  | ELF_LINK_HASH_REF_REGULAR_NONWEAK
+                                  | ELF_LINK_HASH_NEEDS_PLT));
   else
     _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
 }
index e2de01e..c7d48aa 100644 (file)
@@ -336,7 +336,8 @@ ppc_elf_copy_indirect_symbol (const struct elf_backend_data *bed,
     dir->elf_link_hash_flags |=
       (ind->elf_link_hash_flags & (ELF_LINK_HASH_REF_DYNAMIC
                                   | ELF_LINK_HASH_REF_REGULAR
-                                  | ELF_LINK_HASH_REF_REGULAR_NONWEAK));
+                                  | ELF_LINK_HASH_REF_REGULAR_NONWEAK
+                                  | ELF_LINK_HASH_NEEDS_PLT));
   else
     _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
 }
index 61b1cbf..32bf8bf 100644 (file)
@@ -914,7 +914,8 @@ elf_s390_copy_indirect_symbol (bed, dir, ind)
     dir->elf_link_hash_flags |=
       (ind->elf_link_hash_flags & (ELF_LINK_HASH_REF_DYNAMIC
                                   | ELF_LINK_HASH_REF_REGULAR
-                                  | ELF_LINK_HASH_REF_REGULAR_NONWEAK));
+                                  | ELF_LINK_HASH_REF_REGULAR_NONWEAK
+                                  | ELF_LINK_HASH_NEEDS_PLT));
   else
     _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
 }
index 9ffd05b..0ac67e5 100644 (file)
@@ -6339,7 +6339,8 @@ sh_elf_copy_indirect_symbol (const struct elf_backend_data *bed,
     dir->elf_link_hash_flags |=
       (ind->elf_link_hash_flags & (ELF_LINK_HASH_REF_DYNAMIC
                                   | ELF_LINK_HASH_REF_REGULAR
-                                  | ELF_LINK_HASH_REF_REGULAR_NONWEAK));
+                                  | ELF_LINK_HASH_REF_REGULAR_NONWEAK
+                                  | ELF_LINK_HASH_NEEDS_PLT));
   else
     _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
 }
index e8c276b..cec239e 100644 (file)
@@ -47,9 +47,6 @@ static bfd_boolean elf_xtensa_check_relocs
           const Elf_Internal_Rela *));
 static void elf_xtensa_hide_symbol
   PARAMS ((struct bfd_link_info *, struct elf_link_hash_entry *, bfd_boolean));
-static void elf_xtensa_copy_indirect_symbol
-  PARAMS ((const struct elf_backend_data *, struct elf_link_hash_entry *,
-          struct elf_link_hash_entry *));
 static asection *elf_xtensa_gc_mark_hook
   PARAMS ((asection *, struct bfd_link_info *, Elf_Internal_Rela *,
           struct elf_link_hash_entry *, Elf_Internal_Sym *));
@@ -796,19 +793,6 @@ elf_xtensa_hide_symbol (info, h, force_local)
 }
 
 
-static void
-elf_xtensa_copy_indirect_symbol (bed, dir, ind)
-     const struct elf_backend_data *bed;
-     struct elf_link_hash_entry *dir, *ind;
-{
-  _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
-
-  /* The standard function doesn't copy the NEEDS_PLT flag.  */
-  dir->elf_link_hash_flags |=
-    (ind->elf_link_hash_flags & ELF_LINK_HASH_NEEDS_PLT);
-}
-
-
 /* Return the section that should be marked against GC for a given
    relocation.  */
 
@@ -5850,7 +5834,6 @@ static struct bfd_elf_special_section const elf_xtensa_special_sections[]=
 
 #define elf_backend_adjust_dynamic_symbol    elf_xtensa_adjust_dynamic_symbol
 #define elf_backend_check_relocs            elf_xtensa_check_relocs
-#define elf_backend_copy_indirect_symbol     elf_xtensa_copy_indirect_symbol
 #define elf_backend_create_dynamic_sections  elf_xtensa_create_dynamic_sections
 #define elf_backend_discard_info            elf_xtensa_discard_info
 #define elf_backend_ignore_discarded_relocs  elf_xtensa_ignore_discarded_relocs
index 8ae3f12..4554c2c 100644 (file)
@@ -3359,7 +3359,8 @@ ppc64_elf_copy_indirect_symbol
   edir->tls_mask |= eind->tls_mask;
 
   mask = (ELF_LINK_HASH_REF_DYNAMIC | ELF_LINK_HASH_REF_REGULAR
-         | ELF_LINK_HASH_REF_REGULAR_NONWEAK | ELF_LINK_NON_GOT_REF);
+         | ELF_LINK_HASH_REF_REGULAR_NONWEAK | ELF_LINK_NON_GOT_REF
+         | ELF_LINK_HASH_NEEDS_PLT);
   /* If called to transfer flags for a weakdef during processing
      of elf_adjust_dynamic_symbol, don't copy ELF_LINK_NON_GOT_REF.
      We clear it ourselves for ELIMINATE_COPY_RELOCS.  */
index b4da0b1..8b521be 100644 (file)
@@ -867,7 +867,8 @@ elf_s390_copy_indirect_symbol (bed, dir, ind)
     dir->elf_link_hash_flags |=
       (ind->elf_link_hash_flags & (ELF_LINK_HASH_REF_DYNAMIC
                                   | ELF_LINK_HASH_REF_REGULAR
-                                  | ELF_LINK_HASH_REF_REGULAR_NONWEAK));
+                                  | ELF_LINK_HASH_REF_REGULAR_NONWEAK
+                                  | ELF_LINK_HASH_NEEDS_PLT));
   else
     _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
 }
index 4cfcba5..5778f16 100644 (file)
@@ -560,7 +560,8 @@ elf64_x86_64_copy_indirect_symbol (const struct elf_backend_data *bed,
     dir->elf_link_hash_flags |=
       (ind->elf_link_hash_flags & (ELF_LINK_HASH_REF_DYNAMIC
                                   | ELF_LINK_HASH_REF_REGULAR
-                                  | ELF_LINK_HASH_REF_REGULAR_NONWEAK));
+                                  | ELF_LINK_HASH_REF_REGULAR_NONWEAK
+                                  | ELF_LINK_HASH_NEEDS_PLT));
   else
     _bfd_elf_link_hash_copy_indirect (bed, dir, ind);
 }
index 24d6079..db4b8ac 100644 (file)
@@ -1592,7 +1592,8 @@ elfNN_ia64_hash_copy_indirect (bed, xdir, xind)
     (ind->root.elf_link_hash_flags
      & (ELF_LINK_HASH_REF_DYNAMIC
         | ELF_LINK_HASH_REF_REGULAR
-        | ELF_LINK_HASH_REF_REGULAR_NONWEAK));
+        | ELF_LINK_HASH_REF_REGULAR_NONWEAK
+        | ELF_LINK_HASH_NEEDS_PLT));
 
   if (ind->root.root.type != bfd_link_hash_indirect)
     return;