Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / osf-core.c
index dee2cbeb397381b8f11288b2f83364e4581597ed..999796753f5d5825cd70d49928dc750db1b58d96 100644 (file)
@@ -1,5 +1,5 @@
 /* BFD back-end for OSF/1 core files.
-   Copyright (C) 1993-2018 Free Software Foundation, Inc.
+   Copyright (C) 1993-2021 Free Software Foundation, Inc.
 
    This file is part of BFD, the Binary File Descriptor library.
 
@@ -70,21 +70,21 @@ make_bfd_asection (bfd *abfd,
   return asect;
 }
 
-static const bfd_target *
+static bfd_cleanup
 osf_core_core_file_p (bfd *abfd)
 {
   int val;
   int i;
   char *secname;
   struct core_filehdr core_header;
-  bfd_size_type amt;
+  size_t amt;
 
   amt = sizeof core_header;
   val = bfd_bread (& core_header, amt, abfd);
   if (val != sizeof core_header)
     return NULL;
 
-  if (! CONST_STRNEQ (core_header.magic, "Core"))
+  if (! startswith (core_header.magic, "Core"))
     return NULL;
 
   core_hdr (abfd) = (struct osf_core_struct *)
@@ -124,7 +124,7 @@ osf_core_core_file_p (bfd *abfd)
          flags = SEC_HAS_CONTENTS;
          break;
        default:
-         _bfd_error_handler (_("Unhandled OSF/1 core file section type %d\n"),
+         _bfd_error_handler (_("unhandled OSF/1 core file section type %d"),
                              core_scnhdr.scntype);
          continue;
        }
@@ -138,7 +138,7 @@ osf_core_core_file_p (bfd *abfd)
 
   /* OK, we believe you.  You're a core file (sure, sure).  */
 
-  return abfd->xvec;
+  return _bfd_no_cleanup;
 
  fail:
   bfd_release (abfd, core_hdr (abfd));
@@ -187,6 +187,7 @@ const bfd_target core_osf_vec =
     ' ',                       /* 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 */
@@ -201,12 +202,16 @@ const bfd_target core_osf_vec =
       osf_core_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_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),
This page took 0.038635 seconds and 4 git commands to generate.