aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlf Carlsson <ulfc@engr.sgi.com>2000-06-20 16:37:36 +0000
committerUlf Carlsson <ulfc@engr.sgi.com>2000-06-20 16:37:36 +0000
commit8a20f077fe9040ba1f32e219a2da7c21c0e6cd1f (patch)
tree580b9f6cd7f0cdb57252d61b218dc458f00bffb6
parentf04f5a67946d3502e5ca3291298e2d7e226b2154 (diff)
downloadgdb-8a20f077fe9040ba1f32e219a2da7c21c0e6cd1f.zip
gdb-8a20f077fe9040ba1f32e219a2da7c21c0e6cd1f.tar.gz
gdb-8a20f077fe9040ba1f32e219a2da7c21c0e6cd1f.tar.bz2
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.
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/elf32-mips.c25
2 files changed, 29 insertions, 1 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 30512d1..9c3e83a 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -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
diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c
index 52471c8..c4da5e5 100644
--- a/bfd/elf32-mips.c
+++ b/bfd/elf32-mips.c
@@ -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 \