aboutsummaryrefslogtreecommitdiff
path: root/bfd/coff-i960.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-05-02 04:11:40 +0000
committerJohn Gilmore <gnu@cygnus>1991-05-02 04:11:40 +0000
commitfc7233808a1d88db99a5181e1ee0f6865f8f5206 (patch)
tree2f0626920d2d237a52aae12eccd0d5b8dd54ec1c /bfd/coff-i960.c
parentff37ea550b842cdb18aca531e5e705c03d4eed72 (diff)
downloadgdb-fc7233808a1d88db99a5181e1ee0f6865f8f5206.zip
gdb-fc7233808a1d88db99a5181e1ee0f6865f8f5206.tar.gz
gdb-fc7233808a1d88db99a5181e1ee0f6865f8f5206.tar.bz2
Merge devo/bfd with GDB's bfd.
Remove obstack.h to ../include and obstack.c to ../libiberty. Move COFF symbol swapping code to coffswap.c where GDB can call it but it won't be duplicated if we have N different COFF targets. Add support for traditional Unix core files (with a upage). This support is from an Ultrix port, but is probably slightly broken now. Improve bfd_release's of obstack'd items on error returns. gcc -Wall fixes. Handle section alignment slightly better in coff, and comment where it needs more work (on page-aligning virtual vs file addresses for DPAGED). Use set_tdata everywhere that tdata is set, to avoid "cast to the left of assignment" problems with some compilers. Move bfd_alloc, bfd_zalloc, bfd_realloc, and bfd_release into libbfd.h (from bfd.h) since they are internal routines. Remove the redundant suffix "_struct" from struct tags. Set symbol count early in file reading, before slurping in the syms, for GDB's use.
Diffstat (limited to 'bfd/coff-i960.c')
-rw-r--r--bfd/coff-i960.c26
1 files changed, 13 insertions, 13 deletions
diff --git a/bfd/coff-i960.c b/bfd/coff-i960.c
index 8f6e688..4768104 100644
--- a/bfd/coff-i960.c
+++ b/bfd/coff-i960.c
@@ -1,3 +1,5 @@
+/* Intel 960 COFF support for BFD. */
+
/* Copyright (C) 1990, 1991 Free Software Foundation, Inc.
This file is part of BFD, the Binary File Diddler.
@@ -19,6 +21,8 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
/* $Id$ */
#define I960 1
+#define BADMAG(x) I960BADMAG(x)
+
#include <ansidecl.h>
#include "sysdep.h"
#include "bfd.h"
@@ -28,9 +32,6 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include "libcoff.h" /* to allow easier abstraction-breaking */
-
-
-
#define CALLS 0x66003800 /* Template for 'calls' instruction */
#define BAL 0x0b000000 /* Template for 'bal' instruction */
#define BAL_MASK 0x00ffffff
@@ -49,9 +50,8 @@ asection *ignore_input_section;
bfd_reloc_status_enum_type result;
coff_symbol_type *cs = coffsymbol(symbol_in);
- /* So the target symbol has to be off coff type, and the symbol
- has to have the correct native information within it
- */
+ /* So the target symbol has to be of coff type, and the symbol
+ has to have the correct native information within it */
if ((cs->symbol.the_bfd->xvec->flavour != bfd_target_coff_flavour_enum)
|| (cs->native == (struct syment *)NULL)) {
/* This is interesting, consider the case where we're outputting */
@@ -60,7 +60,6 @@ asection *ignore_input_section;
/* I complain ? - This will only work if the bout symbol is non */
/* leaf. */
result = bfd_reloc_dangerous;
-
}
else {
switch (cs->native->n_sclass)
@@ -139,9 +138,8 @@ static reloc_howto_type howto_table[] =
};
+/* The real code is in coff-code.h */
-
-#define BADMAG(x) I960BADMAG(x)
#include "coff-code.h"
bfd_target icoff_little_vec =
@@ -166,7 +164,8 @@ bfd_target icoff_little_vec =
bfd_generic_archive_p, _bfd_dummy_target},
{bfd_false, coff_mkobject, /* bfd_set_format */
_bfd_generic_mkarchive, bfd_false},
-JUMP_TABLE(coff)
+
+ JUMP_TABLE(coff)
};
@@ -190,8 +189,9 @@ bfd_target icoff_big_vec =
_do_getllong, _do_putllong, _do_getlshort, _do_putlshort, /* data */
_do_getblong, _do_putblong, _do_getbshort, _do_putbshort, /* hdrs */
- {_bfd_dummy_target, coff_object_p, bfd_generic_archive_p, _bfd_dummy_target},
- {bfd_false, coff_mkobject, _bfd_generic_mkarchive, bfd_false},
+ {_bfd_dummy_target, coff_object_p, bfd_generic_archive_p, _bfd_dummy_target},
+ {bfd_false, coff_mkobject, _bfd_generic_mkarchive, bfd_false},
+
JUMP_TABLE(coff)
- };
+};