From: Nick Clifton Date: Mon, 28 Apr 2014 13:32:59 +0000 (+0100) Subject: This fixes a bootstrapping problem with gcc 4.9 in an x86 PE environment. X-Git-Tag: gdb-7.8-release~459 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f01c1a090e6629be280efb3c596d818f1f74ae2a;p=external%2Fbinutils.git This fixes a bootstrapping problem with gcc 4.9 in an x86 PE environment. The problem was that references to weak function symbols were being incorrectly biased by definition's offset. PR gas/16858 * config/tc-i386.c (md_apply_fix): Do not adjust value of pc-relative fixes against weak symbols. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index a61ad0b..37b1872 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,9 @@ +2014-04-28 Nick Clifton + + PR gas/16858 + * config/tc-i386.c (md_apply_fix): Do not adjust value of + pc-relative fixes against weak symbols. + 2014-04-26 Alan Modra * po/POTFILES.in: Regenerate. diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index cb62cf5..707ce59 100644 --- a/gas/config/tc-i386.c +++ b/gas/config/tc-i386.c @@ -9146,7 +9146,10 @@ md_apply_fix (fixS *fixP, valueT *valP, segT seg ATTRIBUTE_UNUSED) #endif } #if defined (OBJ_COFF) && defined (TE_PE) - if (fixP->fx_addsy != NULL && S_IS_WEAK (fixP->fx_addsy)) + if (fixP->fx_addsy != NULL + && S_IS_WEAK (fixP->fx_addsy) + /* PR 16858: Do not modify weak function references. */ + && ! fixP->fx_pcrel) { value -= S_GET_VALUE (fixP->fx_addsy); }