aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2014-04-28 14:32:59 +0100
committerNick Clifton <nickc@redhat.com>2014-04-28 14:37:01 +0100
commitf01c1a090e6629be280efb3c596d818f1f74ae2a (patch)
tree5c874ae3629e508875e50a5ff2b30370e39edd84 /gas
parent2b577b92f0a6dc2ab894b604415cfe272f273e11 (diff)
downloadgdb-f01c1a090e6629be280efb3c596d818f1f74ae2a.zip
gdb-f01c1a090e6629be280efb3c596d818f1f74ae2a.tar.gz
gdb-f01c1a090e6629be280efb3c596d818f1f74ae2a.tar.bz2
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.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog6
-rw-r--r--gas/config/tc-i386.c5
2 files changed, 10 insertions, 1 deletions
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 <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.
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);
}