2000-06-20 Maciej W. Rozycki <macro@ds2.pg.gda.pl>
authorUlf Carlsson <ulfc@engr.sgi.com>
Tue, 20 Jun 2000 16:37:36 +0000 (16:37 +0000)
committerUlf Carlsson <ulfc@engr.sgi.com>
Tue, 20 Jun 2000 16:37:36 +0000 (16:37 +0000)
* elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
(elf_backend_copy_indirect_symbol): Map to the new function.

bfd/ChangeLog
bfd/elf32-mips.c

index 30512d1b4ddb04c2be9a6bc4bff57d54171e276f..9c3e83a4d6b1b9205b1d2e8f4d3845d1abd6cf8b 100644 (file)
@@ -1,3 +1,8 @@
+2000-06-20  Maciej W. Rozycki  <macro@ds2.pg.gda.pl>
+
+       * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function.
+       (elf_backend_copy_indirect_symbol): Map to the new function.
+
 2000-06-20  Alan Modra  <alan@linuxcare.com.au>
 
        * archive.c (normalize): Correct pointer comparison when checking
index 52471c87f1e95fb0e221c580628f58f1ab3be6fd..c4da5e5da71b9d1b18d753c77033e20871a5b60a 100644 (file)
@@ -944,7 +944,6 @@ static reloc_howto_type elf_mips16_gprel_howto =
         0x07ff001f,            /* dst_mask */
         false);                /* pcrel_offset */
 
-
 /* GNU extensions for embedded-pic.  */
 /* High 16 bits of symbol value, pc-relative.  */
 static reloc_howto_type elf_mips_gnu_rel_hi16 =
@@ -7830,6 +7829,27 @@ _bfd_mips_elf_gc_sweep_hook (abfd, info, sec, relocs)
   return true;
 }
 
+/* Copy data from a MIPS ELF indirect symbol to its direct symbol,
+   hiding the old indirect symbol.  Process additional relocation
+   information.  */
+
+void
+_bfd_mips_elf_copy_indirect_symbol (dir, ind)
+     struct elf_link_hash_entry *dir, *ind;
+{
+  struct mips_elf_link_hash_entry *dirmips, *indmips;
+
+  _bfd_elf_link_hash_copy_indirect (dir, ind);
+
+  dirmips = (struct mips_elf_link_hash_entry *) dir;
+  indmips = (struct mips_elf_link_hash_entry *) ind;
+  dirmips->possibly_dynamic_relocs += indmips->possibly_dynamic_relocs;
+  if (dirmips->min_dyn_reloc_index == 0
+      || (indmips->min_dyn_reloc_index != 0
+          && indmips->min_dyn_reloc_index < dirmips->min_dyn_reloc_index))
+    dirmips->min_dyn_reloc_index = indmips->min_dyn_reloc_index;
+}
+
 /* Adjust a symbol defined by a dynamic object and referenced by a
    regular object.  The current definition is in some section of the
    dynamic object, but we're not including those sections.  We have to
@@ -9110,6 +9130,9 @@ static const struct ecoff_debug_swap mips_elf32_ecoff_debug_swap =
 #define elf_backend_got_header_size    (4*MIPS_RESERVED_GOTNO)
 #define elf_backend_plt_header_size    0
 
+#define elf_backend_copy_indirect_symbol \
+                                       _bfd_mips_elf_copy_indirect_symbol
+
 #define elf_backend_hide_symbol                _bfd_mips_elf_hide_symbol
 
 #define bfd_elf32_bfd_is_local_label_name \