aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2009-07-16 13:18:52 +0000
committerNathan Sidwell <nathan@codesourcery.com>2009-07-16 13:18:52 +0000
commit9a6f4e976ddfb067ae1e954a03d8887d60956cbc (patch)
tree5c056a5483a53a430d3a5e7daefe618ad087d647 /gas/config
parent3726e6c57f4e006f2744ab5b866ef98f2a79747d (diff)
downloadgdb-9a6f4e976ddfb067ae1e954a03d8887d60956cbc.zip
gdb-9a6f4e976ddfb067ae1e954a03d8887d60956cbc.tar.gz
gdb-9a6f4e976ddfb067ae1e954a03d8887d60956cbc.tar.bz2
gas/
* config/tc-arm.c (md_apply_fix <BFD_RELOC_ARM_TARGET2>): Write the offset for REL targets here. gas/testsuite/ * gas/arm/target-reloc-1.s: New. * gas/arm/target-reloc-1.d: New. ld/testsuite/ * ld-arm/arm-target2.s: Add addend cases. * ld-arm/arm-target2-rel.d: Adjust. * ld-arm/arm-target2-abs.d: Adjust. * ld-arm/arm-target2-got-rel.d: Adjust.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-arm.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/gas/config/tc-arm.c b/gas/config/tc-arm.c
index 95d6a8d..31eb480 100644
--- a/gas/config/tc-arm.c
+++ b/gas/config/tc-arm.c
@@ -20014,10 +20014,17 @@ md_apply_fix (fixS * fixP,
case BFD_RELOC_ARM_GOT32:
case BFD_RELOC_ARM_GOTOFF:
- case BFD_RELOC_ARM_TARGET2:
if (fixP->fx_done || !seg->use_rela_p)
md_number_to_chars (buf, 0, 4);
break;
+
+ case BFD_RELOC_ARM_TARGET2:
+ /* TARGET2 is not partial-inplace, so we need to write the
+ addend here for REL targets, because it won't be written out
+ during reloc processing later. */
+ if (fixP->fx_done || !seg->use_rela_p)
+ md_number_to_chars (buf, fixP->fx_offset, 4);
+ break;
#endif
case BFD_RELOC_RVA: