aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-i386.c
diff options
context:
space:
mode:
authorNick Clifton <nickc@redhat.com>2004-11-08 08:12:53 +0000
committerNick Clifton <nickc@redhat.com>2004-11-08 08:12:53 +0000
commit977cdf5aa7f4f2183060c150041405abbc2410a9 (patch)
tree0cebac5641d1ecd4b8869005951d8d51ecfa973c /bfd/coff-i386.c
parent998b0029709cba36a9e2da16a83bdcbb6e37b2ae (diff)
downloadgdb-977cdf5aa7f4f2183060c150041405abbc2410a9.zip
gdb-977cdf5aa7f4f2183060c150041405abbc2410a9.tar.gz
gdb-977cdf5aa7f4f2183060c150041405abbc2410a9.tar.bz2
Fix support for PECOFF weak symbols
Diffstat (limited to 'bfd/coff-i386.c')
-rw-r--r--bfd/coff-i386.c26
1 files changed, 14 insertions, 12 deletions
diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c
index 65700b6..bdd4083 100644
--- a/bfd/coff-i386.c
+++ b/bfd/coff-i386.c
@@ -4,21 +4,21 @@
Free Software Foundation, Inc.
Written by Cygnus Support.
-This file is part of BFD, the Binary File Descriptor library.
+ This file is part of BFD, the Binary File Descriptor library.
-This program is free software; you can redistribute it and/or modify
-it under the terms of the GNU General Public License as published by
-the Free Software Foundation; either version 2 of the License, or
-(at your option) any later version.
+ This program is free software; you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation; either version 2 of the License, or
+ (at your option) any later version.
-This program is distributed in the hope that it will be useful,
-but WITHOUT ANY WARRANTY; without even the implied warranty of
-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-GNU General Public License for more details.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
-You should have received a copy of the GNU General Public License
-along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, write to the Free Software
+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#include "bfd.h"
#include "sysdep.h"
@@ -119,6 +119,8 @@ coff_i386_reloc (abfd, reloc_entry, symbol, data, input_section, output_bfd,
here. */
if (howto->pc_relative && howto->pcrel_offset)
diff = -(1 << howto->size);
+ else if (symbol->flags & BSF_WEAK)
+ diff = reloc_entry->addend - symbol->value;
else
diff = -reloc_entry->addend;
}