From fd23737e116a7aaea43320c3a188c083b3733b02 Mon Sep 17 00:00:00 2001 From: Alan Modra Date: Tue, 2 Aug 2005 03:28:43 +0000 Subject: [PATCH] * config/tc-ppc.c (md_apply_fix ): Don't warn on overflow if emitting a reloc. --- gas/ChangeLog | 5 +++++ gas/config/tc-ppc.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/gas/ChangeLog b/gas/ChangeLog index 5eeb684297..e4ff266bf2 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2005-08-02 Alan Modra + + * config/tc-ppc.c (md_apply_fix ): Don't warn on overflow + if emitting a reloc. + 2005-07-29 Thiemo Seufer * config/tc-mips.c (s_mips_globl): Allow multiple symbols per .globl. diff --git a/gas/config/tc-ppc.c b/gas/config/tc-ppc.c index 65f395a44e..b0c136c6e2 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; -- 2.11.0