diff --git a/bfd/ChangeLog b/bfd/ChangeLog index ac8230d05f..3ddafcb09d 100644 --- a/bfd/ChangeLog +++ b/bfd/ChangeLog @@ -1,3 +1,8 @@ +2016-08-10 Maciej W. Rozycki + + * elfxx-mips.c (mips_elf_create_stub_symbol): For a microMIPS + stub also add STO_MICROMIPS annotation. + 2016-08-10 Maciej W. Rozycki * elfxx-mips.c (mips_elf_calculate_relocation): Set the ISA bit diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c index cfb9a52af0..6690428c64 100644 --- a/bfd/elfxx-mips.c +++ b/bfd/elfxx-mips.c @@ -1578,12 +1578,13 @@ mips_elf_create_stub_symbol (struct bfd_link_info *info, const char *prefix, asection *s, bfd_vma value, bfd_vma size) { + bfd_boolean micromips_p = ELF_ST_IS_MICROMIPS (h->root.other); struct bfd_link_hash_entry *bh; struct elf_link_hash_entry *elfh; char *name; bfd_boolean res; - if (ELF_ST_IS_MICROMIPS (h->root.other)) + if (micromips_p) value |= 1; /* Create a new symbol. */ @@ -1601,6 +1602,8 @@ mips_elf_create_stub_symbol (struct bfd_link_info *info, elfh->type = ELF_ST_INFO (STB_LOCAL, STT_FUNC); elfh->size = size; elfh->forced_local = 1; + if (micromips_p) + elfh->other = ELF_ST_SET_MICROMIPS (elfh->other); return TRUE; }