]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
This fixes a bootstrapping problem with gcc 4.9 in an x86 PE environment.
authorNick Clifton <nickc@redhat.com>
Mon, 28 Apr 2014 13:32:59 +0000 (14:32 +0100)
committerNick Clifton <nickc@redhat.com>
Mon, 28 Apr 2014 13:37:01 +0000 (14:37 +0100)
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.

gas/ChangeLog
gas/config/tc-i386.c

index a61ad0b3bfb9f782da153e38be874bc747d0b8e0..37b18728a9bb3a32b7a25302b115216071f7635f 100644 (file)
@@ -1,3 +1,9 @@
+2014-04-28  Nick Clifton  <nickc@redhat.com>
+
+       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  <amodra@gmail.com>
 
        * po/POTFILES.in: Regenerate.
index cb62cf5409b001f413fdddb9105ae6594a98651f..707ce59bc5758dbb5e9b5e772be6639923097ee8 100644 (file)
@@ -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);
     }