cris bfd config
[binutils-gdb.git] / bfd / netbsd-core.c
index 7da98247023daad168a8c29d746c2e8c99af080e..cb215937da6f02451178064dedaeb7374c8780b4 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-2018 Free Software Foundation, Inc.
+   Copyright (C) 1988-2022 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.
@@ -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)
@@ -222,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);
@@ -276,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.  */