bfd/
[deliverable/binutils-gdb.git] / bfd / irix-core.c
index b1a575b034dc4e66a862f985b70d408f3f7302f4..740907b86eca0278d33e3b7c44efba514d438f92 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for Irix core files.
-   Copyright 1993, 1994, 1996, 1999, 2001, 2002
+   Copyright 1993, 1994, 1996, 1999, 2001, 2002, 2004
    Free Software Foundation, Inc.
    Written by Stu Grossman, Cygnus Support.
    Converted to back-end form by Ian Lance Taylor, Cygnus Support
@@ -43,16 +43,22 @@ struct sgi_core_struct
 
 static asection *make_bfd_asection
   PARAMS ((bfd *, const char *, flagword, bfd_size_type, bfd_vma, file_ptr));
-static const bfd_target *irix_core_core_file_p PARAMS ((bfd *));
-static char *irix_core_core_file_failing_command PARAMS ((bfd *));
-static int irix_core_core_file_failing_signal PARAMS ((bfd *));
-static boolean irix_core_core_file_matches_executable_p
+static const bfd_target *irix_core_core_file_p
+  PARAMS ((bfd *));
+static char *irix_core_core_file_failing_command
+  PARAMS ((bfd *));
+static int irix_core_core_file_failing_signal
+  PARAMS ((bfd *));
+static bfd_boolean irix_core_core_file_matches_executable_p
   PARAMS ((bfd *, bfd *));
-static void swap_abort PARAMS ((void));
+static void swap_abort
+  PARAMS ((void));
 #ifdef CORE_MAGIC64
-static int do_sections64 PARAMS ((bfd *, struct coreout *));
+static int do_sections64
+  PARAMS ((bfd *, struct coreout *));
 #endif
-static int do_sections PARAMS ((bfd *, struct coreout *));
+static int do_sections
+  PARAMS ((bfd *, struct coreout *));
 
 /* Helper function for irix_core_core_file_p:
    32-bit and 64-bit versions.  */
@@ -155,11 +161,11 @@ do_sections (abfd, coreout)
 }
 
 static asection *
-make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
+make_bfd_asection (abfd, name, flags, size, vma, filepos)
      bfd *abfd;
      const char *name;
      flagword flags;
-     bfd_size_type _raw_size;
+     bfd_size_type size;
      bfd_vma vma;
      file_ptr filepos;
 {
@@ -170,7 +176,7 @@ make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
     return NULL;
 
   asect->flags = flags;
-  asect->_raw_size = _raw_size;
+  asect->size = size;
   asect->vma = vma;
   asect->filepos = filepos;
   asect->alignment_power = 4;
@@ -280,11 +286,11 @@ irix_core_core_file_failing_signal (abfd)
   return core_signal (abfd);
 }
 
-static boolean
+static bfd_boolean
 irix_core_core_file_matches_executable_p (core_bfd, exec_bfd)
      bfd *core_bfd, *exec_bfd;
 {
-  return true;                 /* XXX - FIXME */
+  return TRUE;                 /* XXX - FIXME */
 }
 
 /* If somebody calls any byte-swapping routines, shoot them.  */
@@ -293,10 +299,13 @@ swap_abort()
 {
   abort(); /* This way doesn't require any declaration for ANSI to fuck up */
 }
-#define        NO_GET  ((bfd_vma (*) PARAMS ((   const bfd_byte *))) swap_abort )
-#define        NO_PUT  ((void    (*) PARAMS ((bfd_vma, bfd_byte *))) swap_abort )
-#define        NO_SIGNED_GET \
-  ((bfd_signed_vma (*) PARAMS ((const bfd_byte *))) swap_abort )
+
+#define        NO_GET ((bfd_vma (*) (const void *)) swap_abort)
+#define        NO_PUT ((void (*) (bfd_vma, void *)) swap_abort)
+#define        NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort)
+#define        NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort)
+#define        NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort)
+#define        NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort)
 
 const bfd_target irix_core_vec =
   {
@@ -311,26 +320,26 @@ const bfd_target irix_core_vec =
     0,                                                    /* symbol prefix */
     ' ',                                                  /* ar_pad_char */
     16,                                                           /* ar_max_namelen */
-    NO_GET, NO_SIGNED_GET, NO_PUT,     /* 64 bit data */
-    NO_GET, NO_SIGNED_GET, NO_PUT,     /* 32 bit data */
-    NO_GET, NO_SIGNED_GET, NO_PUT,     /* 16 bit data */
-    NO_GET, NO_SIGNED_GET, NO_PUT,     /* 64 bit hdrs */
-    NO_GET, NO_SIGNED_GET, NO_PUT,     /* 32 bit hdrs */
-    NO_GET, NO_SIGNED_GET, NO_PUT,     /* 16 bit hdrs */
+    NO_GET64, NO_GETS64, NO_PUT64,     /* 64 bit data */
+    NO_GET, NO_GETS, NO_PUT,           /* 32 bit data */
+    NO_GET, NO_GETS, NO_PUT,           /* 16 bit data */
+    NO_GET64, NO_GETS64, NO_PUT64,     /* 64 bit hdrs */
+    NO_GET, NO_GETS, NO_PUT,           /* 32 bit hdrs */
+    NO_GET, NO_GETS, NO_PUT,           /* 16 bit hdrs */
 
     {                          /* bfd_check_format */
-     _bfd_dummy_target,                /* unknown format */
-     _bfd_dummy_target,                /* object file */
-     _bfd_dummy_target,                /* archive */
-     irix_core_core_file_p     /* a core file */
+      _bfd_dummy_target,               /* unknown format */
+      _bfd_dummy_target,               /* object file */
+      _bfd_dummy_target,               /* archive */
+      irix_core_core_file_p            /* a core file */
     },
     {                          /* bfd_set_format */
-     bfd_false, bfd_false,
-     bfd_false, bfd_false
+      bfd_false, bfd_false,
+      bfd_false, bfd_false
     },
     {                          /* bfd_write_contents */
-     bfd_false, bfd_false,
-     bfd_false, bfd_false
+      bfd_false, bfd_false,
+      bfd_false, bfd_false
     },
 
     BFD_JUMP_TABLE_GENERIC (_bfd_generic),
@@ -346,6 +355,6 @@ const bfd_target irix_core_vec =
     NULL,
 
     (PTR) 0                    /* backend_data */
-};
+  };
 
 #endif /* IRIX_CORE */
This page took 0.026559 seconds and 4 git commands to generate.