aboutsummaryrefslogtreecommitdiff
path: root/gas/config
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2013-07-24 14:12:41 +0000
committerTristan Gingold <gingold@adacore.com>2013-07-24 14:12:41 +0000
commit7fa9fcb6db636f393bcef5ed9f14559d3a8354f2 (patch)
treeb7ebc01be50ace1ffa8d52c5b4fa389b9c94ab16 /gas/config
parenta0607b84d2cbfb5c3a559cf5d3973bb32bebf44c (diff)
downloadgdb-7fa9fcb6db636f393bcef5ed9f14559d3a8354f2.zip
gdb-7fa9fcb6db636f393bcef5ed9f14559d3a8354f2.tar.gz
gdb-7fa9fcb6db636f393bcef5ed9f14559d3a8354f2.tar.bz2
bfd/
2013-07-24 Tristan Gingold <gingold@adacore.com> * coff-rs6000.c (xcoff_howto_table): Fix masks and pc_relative for R_RBR. Add numbers in comments. (_bfd_xcoff_reloc_type_lookup): Handle BFD_RELOC_PPC_B16. * coff64-rs6000.c: Likewise. gas/ 2013-07-24 Tristan Gingold <gingold@adacore.com> * config/tc-ppc.c (md_apply_fix): Adjust BFD_RELOC_PPC_B16 on xcoff targets. gas/testsuite/ 2013-07-24 Tristan Gingold <gingold@adacore.com> * gas/ppc/test2xcoff32.s, gas/ppc/test2xcoff32.d: New files * gas/ppc/ppc.exp: Add new test. * gas/ppc/xcoff-br16-1.s, gas/ppc/xcoff-br16-1.d, gas/ppc/xcoff-br16-2.s, gas/ppc/xcoff-br16-2.d: New files * gas/ppc/aix.exp: Add new tests.
Diffstat (limited to 'gas/config')
-rw-r--r--gas/config/tc-ppc.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 7aebda8..5c413d3 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -6417,9 +6417,9 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
char *where;
unsigned long insn;
-#ifdef OBJ_ELF
switch (fixP->fx_r_type)
{
+#ifdef OBJ_ELF
/* The following relocs can't be calculated by the assembler.
Leave the field zero. */
case BFD_RELOC_PPC_TPREL16:
@@ -6528,11 +6528,18 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
case BFD_RELOC_PPC_TLSLD:
fieldval = 0;
break;
+#endif
+
+#ifdef OBJ_XCOFF
+ case BFD_RELOC_PPC_B16:
+ /* Adjust the offset to the instruction boundary. */
+ fieldval += 2;
+ break;
+#endif
default:
break;
}
-#endif
#ifdef OBJ_ELF
/* powerpc uses RELA style relocs, so if emitting a reloc the field