From 8a20f077fe9040ba1f32e219a2da7c21c0e6cd1f Mon Sep 17 00:00:00 2001 From: Ulf Carlsson Date: Tue, 20 Jun 2000 16:37:36 +0000 Subject: [PATCH] 2000-06-20 Maciej W. Rozycki * elf32-mips.c (_bfd_mips_elf_copy_indirect_symbol): New function. (elf_backend_copy_indirect_symbol): Map to the new function. --- bfd/ChangeLog | 5 +++++ bfd/elf32-mips.c | 25 ++++++++++++++++++++++++- 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 30512d1b4dd..9c3e83a4d6b 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2000-06-20 Maciej W. Rozycki + + * 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 * archive.c (normalize): Correct pointer comparison when checking diff --git a/bfd/elf32-mips.c b/bfd/elf32-mips.c index 52471c87f1e..c4da5e5da71 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 \ -- 2.30.2