aboutsummaryrefslogtreecommitdiff
path: root/bfd/bout.c
diff options
context:
space:
mode:
authorJohn Gilmore <gnu@cygnus>1991-10-05 05:18:08 +0000
committerJohn Gilmore <gnu@cygnus>1991-10-05 05:18:08 +0000
commit9e2dad8ed4b31d55281cca6915da87d2ea487125 (patch)
tree11f55d72a3ea4588a6ae85d86824c7543aef9814 /bfd/bout.c
parent5784123fb7a17931182241875d6affa7d3900727 (diff)
downloadfsf-binutils-gdb-9e2dad8ed4b31d55281cca6915da87d2ea487125.zip
fsf-binutils-gdb-9e2dad8ed4b31d55281cca6915da87d2ea487125.tar.gz
fsf-binutils-gdb-9e2dad8ed4b31d55281cca6915da87d2ea487125.tar.bz2
* bfd.c: Remove strerror() to libiberty.
* elf.c: Remove elf_set_section_contents, use generic one. Lint. * libbfd-in.h, libbfd.c: Add bfd_generic_set_section_contents. * libbfd.c (bfd_generic_{get,set}_section_contents): Check that last byte of transfer, not first byte, is within the section. * host-aout.c: Remove `BSD' archive support. Lint. * archures.c: Rename `struct bfd_arch_info_struct' to `struct bfd_arch_info'. Rename `typedef bfd_arch_info_struct_type' to `bfd_arch_info_type'. All uses changed. * reloc.c: Rename `bfd_reloc_status_enum_type' to `bfd_reloc_status_type'. Rename `bfd_reloc_code_enum_real_type' to `bfd_reloc_code_real_type'. (This seems to be a misnomer, it needs a better name.) All uses changed. * targets.c: Rename `enum target_flavour_enum' to `enum target_flavour', and remove the `_enum' from all of the enum values themselves. All uses changed. * configure.in, config/h-i386mach: i386 mach host. * config/t-i386-aout: Use host-aout.c. * trad-core.c: Give it its own xvec's to make it independent of other file formats. * ecoff.c, host-aout.c: Remove refs to trad-core. * config/t-dec3100, t-hp300bsd, t-tahoe, t-vax: Define TRAD_CORE. * targets.c: #ifdef TRAD_CORE, include it in the vector.
Diffstat (limited to 'bfd/bout.c')
-rw-r--r--bfd/bout.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/bfd/bout.c b/bfd/bout.c
index 89f3106..7a353a5 100644
--- a/bfd/bout.c
+++ b/bfd/bout.c
@@ -35,7 +35,7 @@ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */
( ((addr) + ((1<<(align))-1)) & (-1 << (align)))
-
+#define EXEC_BYTES_SIZE (sizeof (struct exec))
PROTO (static boolean, b_out_squirt_out_relocs,(bfd *abfd, asection *section));
PROTO (static bfd_target *, b_out_callback, (bfd *));
@@ -115,9 +115,10 @@ b_out_callback (abfd)
swap_exec_header (abfd, execp);
/* Architecture and machine type */
- abfd->obj_arch = bfd_arch_i960; /* B.out only used on i960 */
- abfd->obj_machine = bfd_mach_i960_core; /* Default */
-/* FIXME: Set real machine type from file here */
+ bfd_set_arch_mach(abfd,
+ bfd_arch_i960, /* B.out only used on i960 */
+ bfd_mach_i960_core /* Default */
+ );
/* The positions of the string table and symbol table. */
obj_str_filepos (abfd) = N_STROFF (anexec);
@@ -254,7 +255,7 @@ swap_exec_header (abfd, execp)
#define BAL 0x0b000000 /* Template for 'bal' instruction */
#define BAL_MASK 0x00ffffff
-static bfd_reloc_status_enum_type
+static bfd_reloc_status_type
callj_callback(abfd, reloc_entry, symbol_in, data, input_section)
bfd *abfd;
arelent *reloc_entry;
@@ -639,8 +640,8 @@ b_out_set_arch_mach (abfd, arch, machine)
enum bfd_architecture arch;
unsigned long machine;
{
- abfd->obj_arch = arch;
- abfd->obj_machine = machine;
+ bfd_default_set_arch_mach(abfd, arch, machine);
+
if (arch == bfd_arch_unknown) /* Unknown machine arch is OK */
return true;
if (arch == bfd_arch_i960) /* i960 default is OK */
@@ -667,7 +668,6 @@ DEFUN(b_out_sizeof_headers,(ignore_abfd, ignore),
{
return sizeof(struct internal_exec);
}
-
@@ -703,7 +703,7 @@ DEFUN(b_out_sizeof_headers,(ignore_abfd, ignore),
bfd_target b_out_vec_big_host =
{
"b.out.big", /* name */
- bfd_target_aout_flavour_enum,
+ bfd_target_aout_flavour,
false, /* data byte order is little */
true, /* hdr byte order is big */
(HAS_RELOC | EXEC_P | /* object flags */
@@ -730,7 +730,7 @@ _do_getb64, _do_putb64, _do_getb32, _do_putb32, _do_getb16, _do_putb16, /* hdrs
bfd_target b_out_vec_little_host =
{
"b.out.little", /* name */
- bfd_target_aout_flavour_enum,
+ bfd_target_aout_flavour,
false, /* data byte order is little */
false, /* header byte order is little */
(HAS_RELOC | EXEC_P | /* object flags */