Remainder of fixes for ARM WINCE support
authorNick Clifton <nickc@redhat.com>
Fri, 9 Jan 2004 13:59:55 +0000 (13:59 +0000)
committerNick Clifton <nickc@redhat.com>
Fri, 9 Jan 2004 13:59:55 +0000 (13:59 +0000)
bfd/ChangeLog
bfd/coff-arm.c

index 94aa94de2e0a0e36242e8bb011d4389733dd0759..1fada0c1c8bf8a5fa4c80bb9b230f02840f60d87 100644 (file)
@@ -1,3 +1,15 @@
+2004-01-09  Dmitry Semyonov  <Dmitry.Semyonov@oktet.ru>
+
+       * coff-arm.c (aoutarm_std_reloc_howto): [ARM_WINCE] Synchronize ARM_26D
+       relocation howto with ARM_26 one for consistency.
+       (coff_arm_relocate_section): Set partial_inplace for ARM_26 relocations
+       that will be converted to ARM_26D ones, since we always want 'done'
+       relocations to be reflected in section's data.
+       (coff_arm_relocate_section): [ARM_WINCE] Quick fix for BL instruction
+       offset.
+       (_bfd_final_link_relocate): Do not modify "inplace" data, if not
+       requested.
+
 2004-01-08  Dmitry Semyonov  <Dmitry.Semyonov@oktet.ru>
 
        * coff-arm.c (coff_arm_relocate_section): Do not alter relocs that
index 79bae59a726e916bb8cbc6ee61551ed88bba6a81..e51d07d583c570036f7d85601313e93e06801144 100644 (file)
@@ -268,7 +268,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
           2,
           2,
           24,
-          FALSE,
+          TRUE,
           0,
           complain_overflow_dont,
           aoutarm_fix_pcrel_26_done,
@@ -276,7 +276,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
           FALSE,
           0x00ffffff,
           0x0,
-          FALSE),
+          PCRELOFFSET),
     HOWTO (ARM_32,
           0,
           2,
@@ -1250,7 +1250,8 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
          when doing a relocatable link.  However, we want to convert
          ARM_26 to ARM_26D relocs if possible.  We return a fake howto in
          this case without pcrel_offset set, and adjust the addend to
-         compensate.  */
+         compensate.  'partial_inplace' is also set, since we want 'done'
+         relocations to be reflected in section's data.  */
       if (rel->r_type == ARM_26
           && h != NULL
           && info->relocatable
@@ -1269,12 +1270,17 @@ coff_arm_relocate_section (output_bfd, info, input_bfd, input_section,
               complain_overflow_signed,
               aoutarm_fix_pcrel_26 ,
               "ARM_26",
-              FALSE,
+              TRUE,
               0x00ffffff,
               0x00ffffff,
               FALSE);
 
           addend -= rel->r_vaddr - input_section->vma;
+#ifdef ARM_WINCE
+          /* FIXME: I don't know why, but the hack is necessary for correct
+                    generation of bl's instruction offset. */
+          addend -= 8;
+#endif
           howto = &fake_arm26_reloc;
         }
 
This page took 0.041468 seconds and 4 git commands to generate.