X-Git-Url: http://drtracing.org/?a=blobdiff_plain;f=bfd%2Fosf-core.c;h=999796753f5d5825cd70d49928dc750db1b58d96;hb=d94297b3f49923c665fe45eaf3df1614b026d8ee;hp=a0da20fbbdd5fb81a97d9dd061b2b40e9a8a93b4;hpb=6f2750feaf2827ef8a1a0a5b2f90c1e9a6cabbd1;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/osf-core.c b/bfd/osf-core.c index a0da20fbbd..999796753f 100644 --- a/bfd/osf-core.c +++ b/bfd/osf-core.c @@ -1,5 +1,5 @@ /* BFD back-end for OSF/1 core files. - Copyright (C) 1993-2016 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,8 +124,8 @@ 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"), - core_scnhdr.scntype); + _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),