*** empty log message ***
[deliverable/binutils-gdb.git] / bfd / i386os9k.c
index ec5e2795a1783f22893c24c20a465994a41f606d..062f39b278d18e0e60a7ee21317f14f90faaeafe 100644 (file)
@@ -1,6 +1,6 @@
 /* BFD back-end for os9000 i386 binaries.
    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1998, 1999, 2001, 2002,
-   2004 Free Software Foundation, Inc.
+   2004, 2005, 2006 Free Software Foundation, Inc.
    Written by Cygnus Support.
 
 This file is part of BFD, the Binary File Descriptor library.
@@ -17,7 +17,7 @@ GNU General Public License for more details.
 
 You should have received a copy of the GNU General Public License
 along with this program; if not, write to the Free Software
-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
+Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
 
 
 #include "bfd.h"
@@ -27,22 +27,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 #include "libaout.h"           /* BFD a.out internal data structures */
 #include "os9k.h"
 
-static const bfd_target * os9k_callback
-  PARAMS ((bfd *));
-static const bfd_target * os9k_object_p
-  PARAMS ((bfd *));
-static int os9k_sizeof_headers
-  PARAMS ((bfd *, bfd_boolean));
-bfd_boolean os9k_swap_exec_header_in
-  PARAMS ((bfd *, mh_com *, struct internal_exec *));
-
 /* Swaps the information in an executable header taken from a raw byte
    stream memory image, into the internal exec_header structure.  */
-bfd_boolean
-os9k_swap_exec_header_in (abfd, raw_bytes, execp)
-     bfd *abfd;
-     mh_com *raw_bytes;
-     struct internal_exec *execp;
+static bfd_boolean
+os9k_swap_exec_header_in (bfd *abfd,
+                         mh_com *raw_bytes,
+                         struct internal_exec *execp)
 {
   mh_com *bytes = (mh_com *) raw_bytes;
   unsigned int dload, dmemsize, dmemstart;
@@ -77,44 +67,12 @@ os9k_swap_exec_header_in (abfd, raw_bytes, execp)
   return TRUE;
 }
 
-static const bfd_target *
-os9k_object_p (abfd)
-     bfd *abfd;
-{
-  struct internal_exec anexec;
-  mh_com exec_bytes;
-
-  if (bfd_bread ((PTR) &exec_bytes, (bfd_size_type) MHCOM_BYTES_SIZE, abfd)
-      != MHCOM_BYTES_SIZE)
-    {
-      if (bfd_get_error () != bfd_error_system_call)
-       bfd_set_error (bfd_error_wrong_format);
-      return 0;
-    }
-
-  anexec.a_info = H_GET_16 (abfd, exec_bytes.m_sync);
-  if (N_BADMAG (anexec))
-    {
-      bfd_set_error (bfd_error_wrong_format);
-      return 0;
-    }
-
-  if (! os9k_swap_exec_header_in (abfd, &exec_bytes, &anexec))
-    {
-      if (bfd_get_error () != bfd_error_system_call)
-       bfd_set_error (bfd_error_wrong_format);
-      return NULL;
-    }
-  return aout_32_some_aout_object_p (abfd, &anexec, os9k_callback);
-}
-
 
 /* Finish up the opening of a b.out file for reading.  Fill in all the
    fields that are not handled by common code.  */
 
 static const bfd_target *
-os9k_callback (abfd)
-     bfd *abfd;
+os9k_callback (bfd *abfd)
 {
   struct internal_exec *execp = exec_hdr (abfd);
   unsigned long bss_start;
@@ -156,10 +114,39 @@ os9k_callback (abfd)
   return abfd->xvec;
 }
 
+static const bfd_target *
+os9k_object_p (bfd *abfd)
+{
+  struct internal_exec anexec;
+  mh_com exec_bytes;
+
+  if (bfd_bread ((PTR) &exec_bytes, (bfd_size_type) MHCOM_BYTES_SIZE, abfd)
+      != MHCOM_BYTES_SIZE)
+    {
+      if (bfd_get_error () != bfd_error_system_call)
+       bfd_set_error (bfd_error_wrong_format);
+      return 0;
+    }
+
+  anexec.a_info = H_GET_16 (abfd, exec_bytes.m_sync);
+  if (N_BADMAG (anexec))
+    {
+      bfd_set_error (bfd_error_wrong_format);
+      return 0;
+    }
+
+  if (! os9k_swap_exec_header_in (abfd, &exec_bytes, &anexec))
+    {
+      if (bfd_get_error () != bfd_error_system_call)
+       bfd_set_error (bfd_error_wrong_format);
+      return NULL;
+    }
+  return aout_32_some_aout_object_p (abfd, &anexec, os9k_callback);
+}
+
 static int
-os9k_sizeof_headers (ignore_abfd, ignore)
-     bfd *ignore_abfd ATTRIBUTE_UNUSED;
-     bfd_boolean ignore ATTRIBUTE_UNUSED;
+os9k_sizeof_headers (bfd *abfd ATTRIBUTE_UNUSED,
+                    struct bfd_link_info *info ATTRIBUTE_UNUSED)
 {
   return sizeof (struct internal_exec);
 }
This page took 1.178409 seconds and 4 git commands to generate.