aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorCarlos O'Donell <carlos@codesourcery.com>2008-07-07 19:12:58 +0000
committerCarlos O'Donell <carlos@codesourcery.com>2008-07-07 19:12:58 +0000
commit79947c5421861704e56232699b629b1f13d400e3 (patch)
treeabb4f7d5051a5f8ca7ee602348cb1af338fe2c97 /gas/config
parentc27e721e3e80bd3557657ce6175e0dc52233b977 (diff)
downloadgdb-79947c5421861704e56232699b629b1f13d400e3.zip
gdb-79947c5421861704e56232699b629b1f13d400e3.tar.gz
gdb-79947c5421861704e56232699b629b1f13d400e3.tar.bz2
gas/
2008-07-07 Paul Brook <paul@codesourcery.com> * config/tc-arm.c (arm_fix_adjustable): Don't adjust MOVW/MOVT relocations. gas/testsuite/ 2008-07-07 Paul Brook <paul@codesourcery.com> * gas/arm/movw-local.d: New test. * gas/arm/movw-local.s: New test.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-arm.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 8aba5fc..0c05074 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -19420,6 +19420,17 @@ arm_fix_adjustable (fixS * fixP)
|| fixP->fx_r_type == BFD_RELOC_ARM_LDR_PC_G0)
return 0;
+ /* MOVW/MOVT REL relocations have limited offsets, so keep the symbols. */
+ if (fixP->fx_r_type == BFD_RELOC_ARM_MOVW
+ || fixP->fx_r_type == BFD_RELOC_ARM_MOVT
+ || fixP->fx_r_type == BFD_RELOC_ARM_MOVW_PCREL
+ || fixP->fx_r_type == BFD_RELOC_ARM_MOVT_PCREL
+ || fixP->fx_r_type == BFD_RELOC_ARM_THUMB_MOVW
+ || fixP->fx_r_type == BFD_RELOC_ARM_THUMB_MOVT
+ || fixP->fx_r_type == BFD_RELOC_ARM_THUMB_MOVW_PCREL
+ || fixP->fx_r_type == BFD_RELOC_ARM_THUMB_MOVT_PCREL)
+ return 0;
+
return 1;
}
#endif /* defined (OBJ_ELF) || defined (OBJ_COFF) */