From 977cdf5aa7f4f2183060c150041405abbc2410a9 Mon Sep 17 00:00:00 2001 From: Nick Clifton Date: Mon, 8 Nov 2004 08:12:53 +0000 Subject: Fix support for PECOFF weak symbols --- bfd/coff-i386.c | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) (limited to 'bfd/coff-i386.c') 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; } -- cgit v1.1