From: Ian Lance Taylor Date: Tue, 26 Nov 1996 16:43:03 +0000 (+0000) Subject: * elf-bfd.h (struct elf_link_hash_entry): Add other field. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6c02f1a02cb0df4888b1363ed0e70c11d81bf74b;p=binutils-gdb.git * elf-bfd.h (struct elf_link_hash_entry): Add other field. * elf.c (_bfd_elf_link_hash_newfunc): Initialize other field. (swap_out_syms): Set st_other from existing st_other field. * elflink.h (elf_link_add_object_symbols): Store st_other in hash table other field. (elf_link_output_extsym): Set the other field from the global hash table entry. * elf32-mips.c (enum reloc_type): Add R_MIPS16_26. (elf_mips16_jump_howto): New static variable. (mips16_jump_reloc): New static function. (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_JMP. (mips_info_to_howto_rel): Handle R_MIPS16_26. (mips_elf_relocate_section): Handle R_MIPS16_26. Handle R_MIPS_26 to a mips16 symbol. * reloc.c (BFD_RELOC_MIPS16_JMP): Add to list of relocs. * bfd-in2.h, libbfd.h: Rebuild. * cpu-mips.c (arch_info_struct): Add mips:16 entry. --- diff --git a/bfd/ChangeLog b/bfd/ChangeLog index 579ef096972..a3e3f82a968 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,23 @@ +Tue Nov 26 11:07:31 1996 Ian Lance Taylor + + * elf-bfd.h (struct elf_link_hash_entry): Add other field. + * elf.c (_bfd_elf_link_hash_newfunc): Initialize other field. + (swap_out_syms): Set st_other from existing st_other field. + * elflink.h (elf_link_add_object_symbols): Store st_other in hash + table other field. + (elf_link_output_extsym): Set the other field from the global hash + table entry. + * elf32-mips.c (enum reloc_type): Add R_MIPS16_26. + (elf_mips16_jump_howto): New static variable. + (mips16_jump_reloc): New static function. + (bfd_elf32_bfd_reloc_type_lookup): Handle BFD_RELOC_MIPS16_JMP. + (mips_info_to_howto_rel): Handle R_MIPS16_26. + (mips_elf_relocate_section): Handle R_MIPS16_26. Handle R_MIPS_26 + to a mips16 symbol. + * reloc.c (BFD_RELOC_MIPS16_JMP): Add to list of relocs. + * bfd-in2.h, libbfd.h: Rebuild. + * cpu-mips.c (arch_info_struct): Add mips:16 entry. + Mon Nov 25 11:23:32 1996 Ian Lance Taylor * configure.host: Use long long for mips-sgi-irix6*. diff --git a/bfd/elflink.h b/bfd/elflink.h index dcc5827db30..3c8c33956c9 100644 --- a/bfd/elflink.h +++ b/bfd/elflink.h @@ -802,6 +802,10 @@ elf_link_add_object_symbols (abfd, info) h->type = ELF_ST_TYPE (sym.st_info); } + if (sym.st_other != 0 + && (definition || h->other == 0)) + h->other = sym.st_other; + /* Set a flag in the hash table entry indicating the type of reference or definition we just found. Keep a count of the number of dynamic symbols we find. A dynamic symbol @@ -2576,7 +2580,7 @@ elf_link_output_extsym (h, data) sym.st_value = 0; sym.st_size = h->size; - sym.st_other = 0; + sym.st_other = h->other; if (h->root.type == bfd_link_hash_undefweak || h->root.type == bfd_link_hash_defweak) sym.st_info = ELF_ST_INFO (STB_WEAK, h->type);