aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2002-08-06 02:30:06 +0000
committerAlan Modra <amodra@gmail.com>2002-08-06 02:30:06 +0000
commit95210096dccbe38cd864b09980169f325abd05ef (patch)
tree74c63872eeb75ac40f9d2bf4ebd02cf6e5eb71d2 /gas/config/tc-ppc.c
parent48bfecdd7180c1a10ba7caaae49f194150fa33a7 (diff)
downloadgdb-95210096dccbe38cd864b09980169f325abd05ef.zip
gdb-95210096dccbe38cd864b09980169f325abd05ef.tar.gz
gdb-95210096dccbe38cd864b09980169f325abd05ef.tar.bz2
* config/tc-ppc.c (md_apply_fix3): Adjust 16 bit XCOFF reloc offset.
Diffstat (limited to 'gas/config/tc-ppc.c')
-rw-r--r--gas/config/tc-ppc.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index f94cad5..fb10737 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -5223,7 +5223,14 @@ md_apply_fix3 (fixP, valP, seg)
else if ((operand->flags & PPC_OPERAND_RELATIVE) != 0
&& operand->bits == 16
&& operand->shift == 0)
- fixP->fx_r_type = BFD_RELOC_PPC_B16;
+ {
+ fixP->fx_r_type = BFD_RELOC_PPC_B16;
+#ifdef OBJ_XCOFF
+ fixP->fx_size = 2;
+ if (target_big_endian)
+ fixP->fx_where += 2;
+#endif
+ }
else if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0
&& operand->bits == 26
&& operand->shift == 0)
@@ -5231,7 +5238,14 @@ md_apply_fix3 (fixP, valP, seg)
else if ((operand->flags & PPC_OPERAND_ABSOLUTE) != 0
&& operand->bits == 16
&& operand->shift == 0)
- fixP->fx_r_type = BFD_RELOC_PPC_BA16;
+ {
+ fixP->fx_r_type = BFD_RELOC_PPC_BA16;
+#ifdef OBJ_XCOFF
+ fixP->fx_size = 2;
+ if (target_big_endian)
+ fixP->fx_where += 2;
+#endif
+ }
#if defined (OBJ_XCOFF) || defined (OBJ_ELF)
else if ((operand->flags & PPC_OPERAND_PARENS) != 0
&& operand->bits == 16