Apply fixes to allow arm WinCE toolchain to produce working executables.
[deliverable/binutils-gdb.git] / bfd / coff-arm.c
index 6b83dc7af7fd6c7c1efee572be0114e8be3a49ee..c5b47652108af4d652dcedb1ab9f57727a6b57e9 100644 (file)
@@ -220,7 +220,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
           complain_overflow_dont,
           aoutarm_fix_pcrel_26_done,
           "ARM_26D",
-          FALSE,
+          TRUE,        /* partial_inplace.  */
           0x00ffffff,
           0x0,
           PCRELOFFSET),
@@ -233,7 +233,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
           complain_overflow_bitfield,
           coff_arm_reloc,
           "ARM_32",
-          FALSE,
+          TRUE,        /* partial_inplace.  */
           0xffffffff,
           0xffffffff,
           PCRELOFFSET),
@@ -246,7 +246,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
           complain_overflow_bitfield,
           coff_arm_reloc,
           "ARM_RVA32",
-          FALSE,
+          TRUE,        /* partial_inplace.  */
           0xffffffff,
           0xffffffff,
           PCRELOFFSET),
@@ -294,7 +294,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
           complain_overflow_bitfield,
           coff_arm_reloc,
           "ARM_SECTION",
-          FALSE,
+          TRUE,        /* partial_inplace.  */
           0x0000ffff,
           0x0000ffff,
           PCRELOFFSET),
@@ -307,7 +307,7 @@ static reloc_howto_type aoutarm_std_reloc_howto[] =
           complain_overflow_bitfield,
           coff_arm_reloc,
           "ARM_SECREL",
-          FALSE,
+          TRUE,        /* partial_inplace.  */
           0xffffffff,
           0xffffffff,
           PCRELOFFSET),
@@ -1209,12 +1209,14 @@ coff_arm_relocate_section (bfd *output_bfd,
                     generation of bl's instruction offset.  */
           addend -= 8;
 #endif
-          howto = &fake_arm26_reloc;
+          howto = & fake_arm26_reloc;
         }
 
 #ifdef ARM_WINCE
       /* MS ARM-CE makes the reloc relative to the opcode's pc, not
         the next opcode's pc, so is off by one.  */
+      if (howto->pc_relative && !info->relocatable)
+       addend -= 8;
 #endif
 
       /* If we are doing a relocatable link, then we can just ignore
This page took 0.025043 seconds and 4 git commands to generate.