Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / netbsd-core.c
index a89030181fd4d9fe0cf8804e3c42ac98a3f08dbd..60fa69d1423f98ea24f9ef857e002f642c36d177 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back end for NetBSD style core files
 /* BFD back end for NetBSD style core files
-   Copyright (C) 1988-2017 Free Software Foundation, Inc.
+   Copyright (C) 1988-2021 Free Software Foundation, Inc.
    Written by Paul Kranenburg, EUR
 
    This file is part of BFD, the Binary File Descriptor library.
    Written by Paul Kranenburg, EUR
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -22,7 +22,7 @@
 #include "sysdep.h"
 #include "bfd.h"
 #include "libbfd.h"
 #include "sysdep.h"
 #include "bfd.h"
 #include "libbfd.h"
-#include "libaout.h"           /* BFD a.out internal data structures.  */
+#include "libaout.h"          /* BFD a.out internal data structures.  */
 
 #include <sys/param.h>
 #include <sys/dir.h>
 
 #include <sys/param.h>
 #include <sys/dir.h>
@@ -51,7 +51,7 @@ struct netbsd_core_struct
 
 /* Handle NetBSD-style core dump file.  */
 
 
 /* Handle NetBSD-style core dump file.  */
 
-static const bfd_target *
+static bfd_cleanup
 netbsd_core_file_p (bfd *abfd)
 {
   int val;
 netbsd_core_file_p (bfd *abfd)
 {
   int val;
@@ -60,7 +60,7 @@ netbsd_core_file_p (bfd *abfd)
   asection *asect;
   struct core core;
   struct coreseg coreseg;
   asection *asect;
   struct core core;
   struct coreseg coreseg;
-  bfd_size_type amt = sizeof core;
+  size_t amt = sizeof core;
 
   val = bfd_bread (&core, amt, abfd);
   if (val != sizeof core)
 
   val = bfd_bread (&core, amt, abfd);
   if (val != sizeof core)
@@ -198,10 +198,6 @@ netbsd_core_file_p (bfd *abfd)
       bfd_default_set_arch_mach (abfd, bfd_arch_m68k, 0);
       break;
 
       bfd_default_set_arch_mach (abfd, bfd_arch_m68k, 0);
       break;
 
-    case M_88K_OPENBSD:
-      bfd_default_set_arch_mach (abfd, bfd_arch_m88k, 0);
-      break;
-
     case M_HPPA_OPENBSD:
       bfd_default_set_arch_mach (abfd, bfd_arch_hppa, bfd_mach_hppa11);
       break;
     case M_HPPA_OPENBSD:
       bfd_default_set_arch_mach (abfd, bfd_arch_hppa, bfd_mach_hppa11);
       break;
@@ -226,7 +222,7 @@ netbsd_core_file_p (bfd *abfd)
     }
 
   /* OK, we believe you.  You're a core file (sure, sure).  */
     }
 
   /* OK, we believe you.  You're a core file (sure, sure).  */
-  return abfd->xvec;
+  return _bfd_no_cleanup;
 
  punt:
   bfd_release (abfd, abfd->tdata.any);
 
  punt:
   bfd_release (abfd, abfd->tdata.any);
@@ -280,6 +276,7 @@ const bfd_target core_netbsd_vec =
     ' ',                       /* ar_pad_char.  */
     16,                                /* ar_max_namelen.  */
     0,                         /* Match priority.  */
     ' ',                       /* ar_pad_char.  */
     16,                                /* ar_max_namelen.  */
     0,                         /* Match priority.  */
+    TARGET_KEEP_UNUSED_SECTION_SYMBOLS, /* keep unused section symbols.  */
     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 data.  */
     NO_GET, NO_GETS, NO_PUT,           /* 32 bit data.  */
     NO_GET, NO_GETS, NO_PUT,           /* 16 bit data.  */
@@ -294,12 +291,16 @@ const bfd_target core_netbsd_vec =
       netbsd_core_file_p               /* A core file.  */
     },
     {                                  /* bfd_set_format.  */
       netbsd_core_file_p               /* A core file.  */
     },
     {                                  /* bfd_set_format.  */
-      bfd_false, bfd_false,
-      bfd_false, bfd_false
+      _bfd_bool_bfd_false_error,
+      _bfd_bool_bfd_false_error,
+      _bfd_bool_bfd_false_error,
+      _bfd_bool_bfd_false_error
     },
     {                                  /* bfd_write_contents.  */
     },
     {                                  /* bfd_write_contents.  */
-      bfd_false, bfd_false,
-      bfd_false, bfd_false
+      _bfd_bool_bfd_false_error,
+      _bfd_bool_bfd_false_error,
+      _bfd_bool_bfd_false_error,
+      _bfd_bool_bfd_false_error
     },
 
     BFD_JUMP_TABLE_GENERIC (_bfd_generic),
     },
 
     BFD_JUMP_TABLE_GENERIC (_bfd_generic),
@@ -314,5 +315,5 @@ const bfd_target core_netbsd_vec =
 
     NULL,
 
 
     NULL,
 
-    NULL                               /* Backend_data.  */
+    NULL                               /* Backend_data.  */
   };
   };
This page took 0.025522 seconds and 4 git commands to generate.