aboutsummaryrefslogtreecommitdiff
path: root/gas/config/tc-ppc.c
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2005-08-02 03:28:43 +0000
committerAlan Modra <amodra@gmail.com>2005-08-02 03:28:43 +0000
commit4e6935a6475f5041952c15c84c7d363fb98f055f (patch)
treee0db1665a213a8ad47b0ad2b932ddb19618a3cab /gas/config/tc-ppc.c
parentfc0c53a0cd0660f9205d1f599ce89779cfd293c5 (diff)
downloadgdb-4e6935a6475f5041952c15c84c7d363fb98f055f.zip
gdb-4e6935a6475f5041952c15c84c7d363fb98f055f.tar.gz
gdb-4e6935a6475f5041952c15c84c7d363fb98f055f.tar.bz2
* config/tc-ppc.c (md_apply_fix <ELF>): Don't warn on overflow
if emitting a reloc.
Diffstat (limited to 'gas/config/tc-ppc.c')
-rw-r--r--gas/config/tc-ppc.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c
index 65f395a..b0c136c 100644
--- a/gas/config/tc-ppc.c
+++ b/gas/config/tc-ppc.c
@@ -6014,6 +6014,13 @@ md_apply_fix (fixP, valP, seg)
#ifdef OBJ_ELF
fixP->fx_addnumber = value;
+
+ /* PowerPC uses RELA relocs, ie. the reloc addend is stored separately
+ from the section contents. If we are going to be emitting a reloc
+ then the section contents are immaterial, so don't warn if they
+ happen to overflow. Leave such warnings to ld. */
+ if (!fixP->fx_done)
+ fixP->fx_no_overflow = 1;
#else
if (fixP->fx_r_type != BFD_RELOC_PPC_TOC16)
fixP->fx_addnumber = 0;