summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog8
-rw-r--r--bfd/coff-i386.c26
-rw-r--r--include/coff/ChangeLog6
-rw-r--r--include/coff/pe.h7
4 files changed, 34 insertions, 13 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index 849761eda71..dbd2d536d26 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,11 @@
+2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
+
+ * coff-i386.c (coff_i386_reloc): Fix weak symbols.
+ * cofflink.c (_bfd_coff_link_input_bfd): Don't process
+ C_NT_WEAK aux entries.
+ (_bfd_coff_generic_relocate_section): Handle undefined
+ aliases.
+
2004-11-07 Andreas Schwab <schwab@suse.de>
* elf32-m68k.c (elf_m68k_adjust_dynamic_symbol): Use
diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c
index 65700b6038b..bdd40831519 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;
}
diff --git a/include/coff/ChangeLog b/include/coff/ChangeLog
index 290a5070ab4..d107734e924 100644
--- a/include/coff/ChangeLog
+++ b/include/coff/ChangeLog
@@ -1,3 +1,9 @@
+2004-11-08 Aaron W. LaFramboise <aaron98wiridge9@aaronwl.com>
+
+ * pe.h (IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY): Define.
+ (IMAGE_WEAK_EXTERN_SEARCH_LIBRARY): Same.
+ (IMAGE_WEAK_EXTERN_SEARCH_ALIAS): Same.
+
2004-08-13 Mark Kettenis <kettenis@gnu.org>
* symconst.h (langMax): Fix typo in comment.
diff --git a/include/coff/pe.h b/include/coff/pe.h
index 363d307379b..46128dd82c6 100644
--- a/include/coff/pe.h
+++ b/include/coff/pe.h
@@ -1,6 +1,6 @@
/* pe.h - PE COFF header information
- Copyright 2000, 2001, 2003 Free Software Foundation, Inc.
+ Copyright 2000, 2001, 2003, 2004 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -310,4 +310,9 @@ typedef struct
#define IMPORT_NAME_NOPREFIX 2
#define IMPORT_NAME_UNDECORATE 3
+/* Weak external characteristics. */
+#define IMAGE_WEAK_EXTERN_SEARCH_NOLIBRARY 1
+#define IMAGE_WEAK_EXTERN_SEARCH_LIBRARY 2
+#define IMAGE_WEAK_EXTERN_SEARCH_ALIAS 3
+
#endif /* _PE_H */