Automatic date update in version.in
[deliverable/binutils-gdb.git] / bfd / sco5-core.c
index 896a970c9d1a314217a16863e519b4564939cab5..167dba9f321f43de6712153debc26affa6d48213 100644 (file)
@@ -1,7 +1,5 @@
 /* BFD back end for SCO5 core files (U-area and raw sections)
-   Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
-   2010, 2011, 2012
-   Free Software Foundation, Inc.
+   Copyright (C) 1998-2021 Free Software Foundation, Inc.
    Written by Jouke Numan <jnuman@hiscom.nl>
 
    This file is part of BFD, the Binary File Descriptor library.
@@ -73,7 +71,7 @@ static struct user *
 read_uarea (bfd *abfd, int filepos)
 {
   struct sco5_core_struct *rawptr;
-  bfd_size_type amt = sizeof (struct sco5_core_struct);
+  size_t amt = sizeof (struct sco5_core_struct);
 
   rawptr = (struct sco5_core_struct *) bfd_zmalloc (amt);
   if (rawptr == NULL)
@@ -103,7 +101,7 @@ read_uarea (bfd *abfd, int filepos)
   return &rawptr->u;
 }
 
-const bfd_target *
+bfd_cleanup
 sco5_core_file_p (bfd *abfd)
 {
   int coffset_siz, val, nsecs, cheadoffs;
@@ -174,7 +172,7 @@ sco5_core_file_p (bfd *abfd)
                              (file_ptr) coffsets.u_stack))
        goto fail;
 
-      return abfd->xvec;               /* Done for version 1 */
+      return _bfd_no_cleanup;          /* Done for version 1 */
     }
 
   /* Immediately before coreoffsets region is a long with offset in core
@@ -288,8 +286,8 @@ sco5_core_file_p (bfd *abfd)
          secname = NULL;       /* Ignore these */
          break;
        default:
-         (*_bfd_error_handler) ("Unhandled SCO core file section type %d\n",
-                                chead.cs_stype);
+         _bfd_error_handler ("Unhandled SCO core file section type %d\n",
+                             chead.cs_stype);
          continue;
        }
 
@@ -302,7 +300,7 @@ sco5_core_file_p (bfd *abfd)
 
     }
 
-  return abfd->xvec;
+  return _bfd_no_cleanup;
 
  fail:
   if (abfd->tdata.any)
@@ -346,7 +344,7 @@ swap_abort (void)
 #define        NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort)
 #define        NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort)
 
-const bfd_target sco5_core_vec =
+const bfd_target core_sco5_vec =
   {
     "sco5-core",
     bfd_target_unknown_flavour,
@@ -360,6 +358,7 @@ const bfd_target sco5_core_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 */
@@ -374,12 +373,16 @@ const bfd_target sco5_core_vec =
       sco5_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.02621 seconds and 4 git commands to generate.