aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-ppc.c
diff options
context:
space:
mode:
authorTristan Gingold <gingold@adacore.com>2007-11-07 14:10:49 +0000
committerTristan Gingold <gingold@adacore.com>2007-11-07 14:10:49 +0000
commit8edcbfcd2e679b220d324ab908c67756fe27462e (patch)
treecec02c094b86ebdaca27ed3b0351c8b623e956bd /gas/config/tc-ppc.c
parentabbda6d05d1dfded890bf0a05dda61e55cf22223 (diff)
downloadgdb-8edcbfcd2e679b220d324ab908c67756fe27462e.zip
gdb-8edcbfcd2e679b220d324ab908c67756fe27462e.tar.gz
gdb-8edcbfcd2e679b220d324ab908c67756fe27462e.tar.bz2
* config/tc-ppc.c (md_apply_fix): For PPC_TOC16 on XCOFF, uses offset
within the TOC instead of the VMA. * gas/ppc/test1xcoff32.d: Updated to match RTOC bug fix.
Diffstat (limited to 'gas/config/tc-ppc.c')
-rw-r--r--gas/config/tc-ppc.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 2a59847..1679c7e 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -6059,10 +6059,11 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED)
#ifdef TE_PE
fixP->fx_addnumber = 0;
#else
- /* We want to use the offset within the data segment of the
- symbol, not the actual VMA of the symbol. */
+ /* We want to use the offset within the toc, not the actual VMA
+ of the symbol. */
fixP->fx_addnumber =
- - bfd_get_section_vma (stdoutput, S_GET_SEGMENT (fixP->fx_addsy));
+ - bfd_get_section_vma (stdoutput, S_GET_SEGMENT (fixP->fx_addsy))
+ - S_GET_VALUE (ppc_toc_csect);
#endif
}
#endif