]> Git Repo - binutils.git/blobdiff - bfd/aout-adobe.c
Fix typo in last change, print_filtered -> printf_filtered
[binutils.git] / bfd / aout-adobe.c
index 526d7f87febe410308e811fb9eaa95817938b10a..96c48ec10d28213bbd2d3b4fd3be20ca2de7b4e9 100644 (file)
@@ -1,5 +1,5 @@
 /* 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.
@@ -112,8 +112,10 @@ aout_adobe_object_p (abfd)
      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
       {
@@ -135,7 +137,6 @@ aout_adobe_callback (abfd)
      bfd *abfd;
 {
   struct internal_exec *execp = exec_hdr (abfd);
-  unsigned long bss_start;
   asection *sect;
   struct external_segdesc ext[1];
   char *section_name;
@@ -179,7 +180,7 @@ aout_adobe_callback (abfd)
 
     default:
       fprintf (stderr, "Unknown section type in a.out.adobe file: %x\n", 
-              ext->e_type);
+              ext->e_type[0]);
       goto no_more_sections;
     }
 
@@ -276,7 +277,7 @@ aout_adobe_write_object_contents (abfd)
      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;
@@ -309,7 +310,7 @@ aout_adobe_write_object_contents (abfd)
 
   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
@@ -337,12 +338,11 @@ aout_adobe_write_object_contents (abfd)
   /* 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)    {
@@ -351,7 +351,7 @@ aout_adobe_write_object_contents (abfd)
         }
       }
 
-      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)    {
@@ -476,6 +476,11 @@ DEFUN(aout_adobe_sizeof_headers,(ignore_abfd, ignore),
 
 #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 =
 {
@@ -502,6 +507,6 @@ 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
+};
This page took 0.025115 seconds and 4 git commands to generate.