summaryrefslogtreecommitdiff
path: root/bfd/coff-arm.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-01-09 13:59:55 +0000
committerNick Clifton <nickc@redhat.com>2004-01-09 13:59:55 +0000
commit8bebe5992e8aea40cd2e258f00d93408a6e64e31 (patch)
treecdab15fe3f0cb1862867ad9c46c014382e25e06c /bfd/coff-arm.c
parent09ac607171f1a3adf1dda938168ed694d953fa70 (diff)
downloadbinutils-redhat-8bebe5992e8aea40cd2e258f00d93408a6e64e31.tar.gz
Remainder of fixes for ARM WINCE support
Diffstat (limited to 'bfd/coff-arm.c')
-rw-r--r--bfd/coff-arm.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/bfd/coff-arm.c b/bfd/coff-arm.c
index 79bae59a72..e51d07d583 100644
--- a/bfd/coff-arm.c
+++ b/bfd/coff-arm.c
@@ -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;
}