/* BFD back end for NetBSD style core files
- Copyright (C) 1988-2016 Free Software Foundation, Inc.
+ Copyright (C) 1988-2020 Free Software Foundation, Inc.
Written by Paul Kranenburg, EUR
This file is part of BFD, the Binary File Descriptor library.
#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>
/* Handle NetBSD-style core dump file. */
-static const bfd_target *
+static bfd_cleanup
netbsd_core_file_p (bfd *abfd)
{
int val;
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)
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;
}
/* 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);
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_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),
NULL,
- NULL /* Backend_data. */
+ NULL /* Backend_data. */
};