* elfxx-mips.c (mips_elf_calculate_relocation): Don't relocate
authorAdam Nemet <anemet@caviumnetworks.com>
Thu, 3 Sep 2009 18:31:00 +0000 (18:31 +0000)
committerAdam Nemet <anemet@caviumnetworks.com>
Thu, 3 Sep 2009 18:31:00 +0000 (18:31 +0000)
R_MIPS_JALR unless symbol resolves locally.

bfd/ChangeLog
bfd/elfxx-mips.c

index 94dc04912d54684d6d02bc30225e2e4d92c8c1a7..39987cdcd2a5fa1c1e91210de50ae94aeb2bf948 100644 (file)
@@ -1,3 +1,8 @@
+2009-09-03  Adam Nemet  <anemet@caviumnetworks.com>
+
+       * elfxx-mips.c (mips_elf_calculate_relocation): Don't relocate
+       R_MIPS_JALR unless symbol resolves locally.
+
 2009-09-03  Adam Nemet  <anemet@caviumnetworks.com>
 
        * elfxx-mips.c (_bfd_mips_elf_check_relocs): Don't set
index cece0bc7070628d449926cd8cc326bb75053a304..3a1c8ba9bf70548341cecf3ea73ee78f192e93ae 100644 (file)
@@ -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;
This page took 0.043784 seconds and 4 git commands to generate.