aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-i386.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-10-11 04:51:42 +0000
committerJohn Gilmore <gnu@cygnus>1991-10-11 04:51:42 +0000
commit6a469027327f00bc96ad8bb3d17d15d8c41ab20f (patch)
treed008583329a3da59d7868f657b12efff263e94bc /bfd/coff-i386.c
parent074274252f942a2660c310218943f2aa4ef2e237 (diff)
downloadgdb-6a469027327f00bc96ad8bb3d17d15d8c41ab20f.zip
gdb-6a469027327f00bc96ad8bb3d17d15d8c41ab20f.tar.gz
gdb-6a469027327f00bc96ad8bb3d17d15d8c41ab20f.tar.bz2
* Makefile.in: Rename XDEPFILES.
* trad-core.c: Document how to use it nowadays. * i386aout.c, newsos3.c: Clean up. * i386coff.c: Allow 386 coff files to be used as core files too (for reading core files from embedded systems).
Diffstat (limited to 'bfd/coff-i386.c')
-rw-r--r--bfd/coff-i386.c56
1 files changed, 27 insertions, 29 deletions
diff --git a/bfd/coff-i386.c b/bfd/coff-i386.c
index 72990b3..c5c3dd6 100644
--- a/bfd/coff-i386.c
+++ b/bfd/coff-i386.c
@@ -1,21 +1,22 @@
-/* Copyright (C) 1990, 1991 Free Software Foundation, Inc.
+/* BFD back-end for Intel 386 COFF files.
+ Copyright (C) 1990-1991 Free Software Foundation, Inc.
+ Written by Cygnus Support.
-This file is part of BFD, the Binary File Diddler.
+This file is part of BFD, the Binary File Descriptor library.
-BFD is free software; you can redistribute it and/or modify
+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 1, or (at your option)
-any later version.
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
-BFD is distributed in the hope that it will be useful,
+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 BFD; see the file COPYING. If not, write to
-the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
-
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
/* $Id$ */
@@ -26,6 +27,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "libbfd.h"
#include "obstack.h"
#include "i386coff.h"
+#include "internalcoff.h"
#include "libcoff.h"
@@ -54,14 +56,12 @@ static reloc_howto_type howto_table[] =
HOWTO(R_PCRLONG, 0, 2, 32, true, 0, false, true,0,"DISP32", true, 0xffffffff,0xffffffff, false),
};
-
/* Turn a howto into a reloc nunmber */
#define SELECT_RELOC(x,howto) { x = howto->type; }
#define BADMAG(x) I386BADMAG(x)
#include "coffcode.h"
-
#define coff_write_armap bsd_write_armap
bfd_target *i3coff_object_p(a)
@@ -70,10 +70,10 @@ bfd *a ;
bfd_target i386coff_vec =
{
- "i386coff", /* name */
- bfd_target_coff_flavour_enum,
- false, /* data byte order is big */
- false, /* header byte order is big */
+ "i386coff", /* name */
+ bfd_target_coff_flavour,
+ false, /* data byte order is little */
+ false, /* header byte order is little */
(HAS_RELOC | EXEC_P | /* object flags */
HAS_LINENO | HAS_DEBUG |
@@ -83,20 +83,18 @@ bfd_target i386coff_vec =
'/', /* ar_pad_char */
15, /* ar_max_namelen */
-_do_getl64, _do_putl64, _do_getl32, _do_putl32, _do_getl16, _do_putl16, /* data */
-_do_getl64, _do_putl64, _do_getl32, _do_putl32, _do_getl16, _do_putl16, /* hdrs */
-
- {_bfd_dummy_target, i3coff_object_p, /* bfd_check_format */
- bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
- bfd_false},
- {bfd_false, coff_write_object_contents, /* bfd_write_contents */
- _bfd_write_archive_contents, bfd_false},
+ 2, /* minimum alignment power */
+ _do_getl64, _do_putl64, _do_getl32, _do_putl32, _do_getl16, _do_putl16, /* data */
+ _do_getl64, _do_putl64, _do_getl32, _do_putl32, _do_getl16, _do_putl16, /* hdrs */
- JUMP_TABLE(coff),
- COFF_SWAP_TABLE
+/* Note that we allow an object file to be treated as a core file as well. */
+ {_bfd_dummy_target, i3coff_object_p, /* bfd_check_format */
+ bfd_generic_archive_p, i3coff_object_p},
+ {bfd_false, coff_mkobject, _bfd_generic_mkarchive, /* bfd_set_format */
+ bfd_false},
+ {bfd_false, coff_write_object_contents, /* bfd_write_contents */
+ _bfd_write_archive_contents, bfd_false},
+ JUMP_TABLE(coff),
+ COFF_SWAP_TABLE
};
-
-
-