aboutsummaryrefslogtreecommitdiff
path: root/bfd/elfxx-mips.c
diff options
context:
space:
mode:
authorAdam Nemet <anemet@caviumnetworks.com>2009-09-03 18:31:00 +0000
committerAdam Nemet <anemet@caviumnetworks.com>2009-09-03 18:31:00 +0000
commit5bbc5ae7bb145ad8ccaa57c02646a7557e67c1bf (patch)
treec017a360ce158f249dcaa496efeb5838461e233c /bfd/elfxx-mips.c
parent99da6b5fe058088658dda69fdddad915c7f90d0f (diff)
downloadgdb-5bbc5ae7bb145ad8ccaa57c02646a7557e67c1bf.zip
gdb-5bbc5ae7bb145ad8ccaa57c02646a7557e67c1bf.tar.gz
gdb-5bbc5ae7bb145ad8ccaa57c02646a7557e67c1bf.tar.bz2
* elfxx-mips.c (mips_elf_calculate_relocation): Don't relocate
R_MIPS_JALR unless symbol resolves locally.
Diffstat (limited to 'bfd/elfxx-mips.c')
-rw-r--r--bfd/elfxx-mips.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bfd/elfxx-mips.c b/bfd/elfxx-mips.c
index cece0bc..3a1c8ba 100644
--- a/bfd/elfxx-mips.c
+++ b/bfd/elfxx-mips.c
@@ -5489,8 +5489,8 @@ mips_elf_calculate_relocation (bfd *abfd, bfd *input_bfd,
case R_MIPS_JALR:
/* This relocation is only a hint. In some cases, we optimize
it into a bal instruction. But we don't try to optimize
- branches to the PLT; that will wind up wasting time. */
- if (h != NULL && h->root.plt.offset != (bfd_vma) -1)
+ when the symbol does not resolve locally. */
+ if (h != NULL && !SYMBOL_CALLS_LOCAL (info, &h->root))
return bfd_reloc_continue;
value = symbol + addend;
break;