aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/coff-i386.c12
-rw-r--r--binutils/ChangeLog7
-rw-r--r--binutils/dlltool.c20
-rw-r--r--include/coff/ChangeLog6
-rw-r--r--include/coff/i386.h28
-rw-r--r--include/coff/x86_64.h4
7 files changed, 56 insertions, 26 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index ef07c94..49d82173 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-02 Jerker Bäck <jerker.back@gmail.com>
+
+ PR binutils/11017
+ * coff-i386.h (COFF_PAGE_SIZE): Definition moved to coff/i386.h
+
2009-11-30 Joseph Myers <joseph@codesourcery.com>
* configure: Regenerate.
diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c
index 9a763d5..e512b3f 100644
--- a/bfd/coff-i386.c
+++ b/bfd/coff-i386.c
@@ -1,6 +1,6 @@
/* BFD back-end for Intel 386 COFF files.
Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008
+ 2000, 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
Free Software Foundation, Inc.
Written by Cygnus Support.
@@ -44,13 +44,13 @@
#include "libcoff.h"
static bfd_reloc_status_type coff_i386_reloc
- PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
+ (bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **);
static reloc_howto_type *coff_i386_rtype_to_howto
- PARAMS ((bfd *, asection *, struct internal_reloc *,
- struct coff_link_hash_entry *, struct internal_syment *,
- bfd_vma *));
+ (bfd *, asection *, struct internal_reloc *,
+ struct coff_link_hash_entry *, struct internal_syment *,
+ bfd_vma *);
static reloc_howto_type *coff_i386_reloc_type_lookup
- PARAMS ((bfd *, bfd_reloc_code_real_type));
+ (bfd *, bfd_reloc_code_real_type);
#define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (2)
/* The page size is a guess based on ELF. */
diff --git a/binutils/ChangeLog b/binutils/ChangeLog
index e1d8905..13c917f 100644
--- a/binutils/ChangeLog
+++ b/binutils/ChangeLog
@@ -1,3 +1,10 @@
+2009-12-02 Jerker Bäck <jerker.back@gmail.com>
+
+ PR binutils/11017
+ * dlltool.c (PAGE_SIZE): Delete.
+ (PAGE_MASK): Provide default definition based on COFF_PAGE_SIZE.
+ Check for DLLTOOL_DEFAULT_MX86_64 and DLLTOOL_DEFAULT_I386.
+
2009-12-01 Joseph Myers <joseph@codesourcery.com>
* readelf.c (get_machine_name, get_osabi_name): Handle more
diff --git a/binutils/dlltool.c b/binutils/dlltool.c
index 72a4a7e..b9d717f 100644
--- a/binutils/dlltool.c
+++ b/binutils/dlltool.c
@@ -241,9 +241,6 @@
#define show_allnames 0
-#define PAGE_SIZE ((bfd_vma) 4096)
-#define PAGE_MASK ((bfd_vma) (-4096))
-
#include "sysdep.h"
#include "bfd.h"
#include "libiberty.h"
@@ -263,11 +260,22 @@
#include "coff/arm.h"
#include "coff/internal.h"
#endif
-#ifdef DLLTOOL_MX86_64
+#ifdef DLLTOOL_DEFAULT_MX86_64
#include "coff/x86_64.h"
#endif
+#ifdef DLLTOOL_DEFAULT_I386
+#include "coff/i386.h"
+#endif
+
+#ifndef COFF_PAGE_SIZE
+#define COFF_PAGE_SIZE ((bfd_vma) 4096)
+#endif
+
+#ifndef PAGE_MASK
+#define PAGE_MASK ((bfd_vma) (- COFF_PAGE_SIZE))
+#endif
-/* get current BFD error message */
+/* Get current BFD error message. */
#define bfd_get_errmsg() (bfd_errmsg (bfd_get_error ()))
/* Forward references. */
@@ -2119,7 +2127,7 @@ gen_exp_file (void)
if (base_file)
{
bfd_vma addr;
- bfd_vma need[PAGE_SIZE];
+ bfd_vma need[COFF_PAGE_SIZE];
bfd_vma page_addr;
bfd_size_type numbytes;
int num_entries;
diff --git a/include/coff/ChangeLog b/include/coff/ChangeLog
index 66ca81f..56d4c68 100644
--- a/include/coff/ChangeLog
+++ b/include/coff/ChangeLog
@@ -1,3 +1,9 @@
+2009-12-02 Jerker Bäck <jerker.back@gmail.com>
+
+ PR binutils/11017
+ * i386lh (COFF_PAGE_SIZE): Define.
+ * x86_64.h (COFF_PAGE_SIZE): Define.
+
2009-10-17 Arnold Metselaar <arnold.metselaar@planet.nl>
* z80.h: Store alignment requirement in section header, to allow
diff --git a/include/coff/i386.h b/include/coff/i386.h
index 023b302..798a097 100644
--- a/include/coff/i386.h
+++ b/include/coff/i386.h
@@ -1,6 +1,6 @@
/* coff information for Intel 386/486.
- Copyright 2001 Free Software Foundation, Inc.
+ Copyright 2001, 2009 Free Software Foundation, Inc.
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
@@ -20,12 +20,14 @@
#define INCLUDE_COMDAT_FIELDS_IN_AUXENT
#include "coff/external.h"
+#define COFF_PAGE_SIZE 0x1000
+
/* Bits for f_flags:
- F_RELFLG relocation info stripped from file
- F_EXEC file is executable (no unresolved external references)
- F_LNNO line numbers stripped from file
- F_LSYMS local symbols stripped from file
- F_AR32WR file has byte ordering of an AR32WR machine (e.g. vax). */
+ F_RELFLG Relocation info stripped from file
+ F_EXEC File is executable (no unresolved external references)
+ F_LNNO Line numbers stripped from file
+ F_LSYMS Local symbols stripped from file
+ F_AR32WR File has byte ordering of an AR32WR machine (e.g. vax). */
#define F_RELFLG (0x0001)
#define F_EXEC (0x0002)
@@ -36,7 +38,7 @@
#define I386PTXMAGIC 0x154
#define I386AIXMAGIC 0x175
-/* This is Lynx's all-platform magic number for executables. */
+/* This is Lynx's all-platform magic number for executables. */
#define LYNXCOFFMAGIC 0415
@@ -45,19 +47,19 @@
&& (x).f_magic != I386PTXMAGIC \
&& (x).f_magic != LYNXCOFFMAGIC)
-#define OMAGIC 0404 /* object files, eg as output */
-#define ZMAGIC 0413 /* demand load format, eg normal ld output */
-#define STMAGIC 0401 /* target shlib */
-#define SHMAGIC 0443 /* host shlib */
+#define OMAGIC 0404 /* Object files, eg as output. */
+#define ZMAGIC 0413 /* Demand load format, eg normal ld output. */
+#define STMAGIC 0401 /* Target shlib. */
+#define SHMAGIC 0443 /* Host shlib. */
-/* define some NT default values */
+/* Define some NT default values. */
/* #define NT_IMAGE_BASE 0x400000 moved to internal.h */
#define NT_SECTION_ALIGNMENT 0x1000
#define NT_FILE_ALIGNMENT 0x200
#define NT_DEF_RESERVE 0x100000
#define NT_DEF_COMMIT 0x1000
-/********************** RELOCATION DIRECTIVES **********************/
+/* Relocation directives. */
struct external_reloc
{
diff --git a/include/coff/x86_64.h b/include/coff/x86_64.h
index b58dd2f..ae43277 100644
--- a/include/coff/x86_64.h
+++ b/include/coff/x86_64.h
@@ -1,5 +1,5 @@
/* COFF information for AMD 64.
- Copyright 2006 Free Software Foundation, Inc.
+ Copyright 2006, 2009 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Descriptor library.
@@ -24,6 +24,8 @@
#include "coff/external.h"
+#define COFF_PAGE_SIZE 0x1000
+
#define AMD64MAGIC 0x8664
#define AMD64BADMAG(x) ((x).f_magic != AMD64MAGIC)