summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog6
-rw-r--r--bfd/elfxx-mips.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 3ddafcb09d4..303d97b9129 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,11 @@
2016-08-10 Maciej W. Rozycki <macro@imgtec.com>
+ * elfxx-mips.c (mips_elf_add_la25_stub): Clear the ISA bit of
+ the stub address retrieved if associated with a microMIPS
+ function.
+
+2016-08-10 Maciej W. Rozycki <macro@imgtec.com>
+
* elfxx-mips.c (mips_elf_create_stub_symbol): For a microMIPS
stub also add STO_MICROMIPS annotation.
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index 6690428c644..ffc524fc0d4 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -1964,6 +1964,8 @@ mips_elf_add_la25_stub (struct bfd_link_info *info,
/* Prefer to use LUI/ADDIU stubs if the function is at the beginning
of the section and if we would need no more than 2 nops. */
value = mips_elf_get_la25_target (stub, &s);
+ if (ELF_ST_IS_MICROMIPS (stub->h->root.other))
+ value &= ~1;
use_trampoline_p = (value != 0 || s->alignment_power > 4);
h->la25_stub = stub;