* elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
authorRichard Sandiford <rdsandiford@googlemail.com>
Wed, 9 Jul 2003 11:52:52 +0000 (11:52 +0000)
committerRichard Sandiford <rdsandiford@googlemail.com>
Wed, 9 Jul 2003 11:52:52 +0000 (11:52 +0000)
of relocations whose offset is -2.

bfd/ChangeLog
bfd/elfxx-mips.c

index 426c76ca983c96bd260e843d02135dee619ce632..c2029a0214eb801aef92f7c7383b74a6afaae832 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
+
+       * elfxx-mips.c (mips_elf_create_dynamic_relocation): Fix handling
+       of relocations whose offset is -2.
+
 2003-07-09  Richard Sandiford  <rsandifo@redhat.com>
 
        * bfd/elfxx-mips.c (mips_elf_create_dynamic_relocation): Treat
index bef1c79b5e0b9834bd895dedf1bac4e44e29e697..9ad54fc34c4e797aaf3597712c58b1dfd59a525b 100644 (file)
@@ -3875,9 +3875,17 @@ mips_elf_create_dynamic_relocation (output_bfd, info, rel, h, sec,
     }
 #endif
 
-  if (outrel[0].r_offset == (bfd_vma) -1
-      || outrel[0].r_offset == (bfd_vma) -2)
+  if (outrel[0].r_offset == (bfd_vma) -1)
+    /* The relocation field has been deleted.  */
     skip = TRUE;
+  else if (outrel[0].r_offset == (bfd_vma) -2)
+    {
+      /* The relocation field has been converted into a relative value of
+        some sort.  Functions like _bfd_elf_write_section_eh_frame expect
+        the field to be fully relocated, so add in the symbol's value.  */
+      skip = TRUE;
+      *addendp += symbol;
+    }
 
   /* If we've decided to skip this relocation, just output an empty
      record.  Note that R_MIPS_NONE == 0, so that this call to memset
This page took 0.036461 seconds and 4 git commands to generate.