/* BFD back-end for a.out.adobe binaries.
- Copyright 1990, 1991, 1992 Free Software Foundation, Inc.
+ Copyright 1990, 1991, 1992, 1993 Free Software Foundation, Inc.
Written by Cygnus Support. Based on bout.c.
This file is part of BFD, the Binary File Descriptor library.
take just about any a.out file as an Adobe a.out file. FIXME! */
if (N_BADMAG (anexec)) {
+ extern char *getenv ();
+
targ = getenv ("GNUTARGET");
- if (targ && strcmp (targ, a_out_adobe_vec.name))
+ if (targ && !strcmp (targ, a_out_adobe_vec.name))
; /* Just continue anyway, if specifically set to this format */
else
{
bfd *abfd;
{
struct internal_exec *execp = exec_hdr (abfd);
- unsigned long bss_start;
asection *sect;
struct external_segdesc ext[1];
char *section_name;
default:
fprintf (stderr, "Unknown section type in a.out.adobe file: %x\n",
- ext->e_type);
+ ext->e_type[0]);
goto no_more_sections;
}
bfd *abfd;
{
struct external_exec swapped_hdr;
- static struct external_segdesc sentinel[1] = {0};
+ static struct external_segdesc sentinel[1]; /* Initialized to zero */
asection *sect;
exec_hdr (abfd)->a_info = ZMAGIC;
aout_adobe_swap_exec_header_out (abfd, exec_hdr (abfd), &swapped_hdr);
- bfd_seek (abfd, 0L, SEEK_SET);
+ bfd_seek (abfd, (file_ptr) 0, SEEK_SET);
bfd_write ((PTR) &swapped_hdr, 1, EXEC_BYTES_SIZE, abfd);
/* Now write out the section information. Text first, data next, rest
/* Now write out reloc info, followed by syms and strings */
if (bfd_get_symcount (abfd) != 0)
{
- bfd_seek (abfd,
- (long)(N_SYMOFF(*exec_hdr(abfd))), SEEK_SET);
+ bfd_seek (abfd, (file_ptr)(N_SYMOFF(*exec_hdr(abfd))), SEEK_SET);
aout_32_write_syms (abfd);
- bfd_seek (abfd, (long)(N_TRELOFF(*exec_hdr(abfd))), SEEK_SET);
+ bfd_seek (abfd, (file_ptr)(N_TRELOFF(*exec_hdr(abfd))), SEEK_SET);
for (sect = abfd->sections; sect; sect = sect->next) {
if (sect->flags & SEC_CODE) {
}
}
- bfd_seek (abfd, (long)(N_DRELOFF(*exec_hdr(abfd))), SEEK_SET);
+ bfd_seek (abfd, (file_ptr)(N_DRELOFF(*exec_hdr(abfd))), SEEK_SET);
for (sect = abfd->sections; sect; sect = sect->next) {
if (sect->flags & SEC_DATA) {
#define aout_32_bfd_get_relocated_section_contents bfd_generic_get_relocated_section_contents
#define aout_32_bfd_relax_section bfd_generic_relax_section
+#define aout_32_bfd_seclet_link bfd_generic_seclet_link
+#define aout_32_bfd_reloc_type_lookup \
+ ((CONST struct reloc_howto_struct *(*) PARAMS ((bfd *, bfd_reloc_code_real_type))) bfd_nullvoidptr)
+#define aout_32_bfd_make_debug_symbol \
+ ((asymbol *(*) PARAMS ((bfd *, void *, unsigned long))) bfd_nullvoidptr)
bfd_target a_out_adobe_vec =
{
{bfd_false, aout_adobe_write_object_contents, /* bfd_write_contents */
_bfd_write_archive_contents, bfd_false},
- JUMP_TABLE(aout_32)
- };
-
+ JUMP_TABLE(aout_32),
+ (PTR) 0
+};