X-Git-Url: http://git.efficios.com/?a=blobdiff_plain;f=bfd%2Fnetbsd-core.c;h=a89030181fd4d9fe0cf8804e3c42ac98a3f08dbd;hb=aebcde5eb475befba571ca9ae7b6c58126d41160;hp=e9111a98501041923014c8d30a43881e3374e837;hpb=69d246d9338a35e64b2244835ac6e77164be668a;p=deliverable%2Fbinutils-gdb.git diff --git a/bfd/netbsd-core.c b/bfd/netbsd-core.c index e9111a9850..a89030181f 100644 --- a/bfd/netbsd-core.c +++ b/bfd/netbsd-core.c @@ -1,14 +1,12 @@ /* BFD back end for NetBSD style core files - Copyright 1988, 1989, 1991, 1992, 1993, 1996, 1998, 1999, 2000, 2001, - 2002, 2003, 2004, 2005 - Free Software Foundation, Inc. + Copyright (C) 1988-2017 Free Software Foundation, Inc. Written by Paul Kranenburg, EUR This file is part of BFD, the Binary File Descriptor library. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -18,10 +16,11 @@ You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software - Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */ + Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, + MA 02110-1301, USA. */ -#include "bfd.h" #include "sysdep.h" +#include "bfd.h" #include "libbfd.h" #include "libaout.h" /* BFD a.out internal data structures. */ @@ -43,6 +42,7 @@ #define SPARC64_WCOOKIE_OFFSET 832 #define netbsd_core_file_matches_executable_p generic_core_file_matches_executable_p +#define netbsd_core_file_pid _bfd_nocore_core_file_pid struct netbsd_core_struct { @@ -126,11 +126,10 @@ netbsd_core_file_p (bfd *abfd) flags = SEC_ALLOC + SEC_HAS_CONTENTS; break; } - asect = bfd_make_section_anyway (abfd, sname); + asect = bfd_make_section_anyway_with_flags (abfd, sname, flags); if (asect == NULL) goto punt; - asect->flags = flags; asect->size = coreseg.c_size; asect->vma = coreseg.c_addr; asect->filepos = offset; @@ -159,11 +158,12 @@ netbsd_core_file_p (bfd *abfd) asect->size = wcookie_offset; /* And create the .wcookie section. */ - asect = bfd_make_section_anyway (abfd, ".wcookie"); + flags = SEC_ALLOC + SEC_HAS_CONTENTS; + asect = bfd_make_section_anyway_with_flags (abfd, ".wcookie", + flags); if (asect == NULL) goto punt; - asect->flags = SEC_ALLOC + SEC_HAS_CONTENTS; asect->size = coreseg.c_size - wcookie_offset; asect->vma = 0; asect->filepos = offset + wcookie_offset; @@ -265,7 +265,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 netbsd_core_vec = +const bfd_target core_netbsd_vec = { "netbsd-core", bfd_target_unknown_flavour, @@ -279,6 +279,7 @@ const bfd_target netbsd_core_vec = 0, /* Symbol prefix. */ ' ', /* ar_pad_char. */ 16, /* ar_max_namelen. */ + 0, /* Match priority. */ 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. */ @@ -313,5 +314,5 @@ const bfd_target netbsd_core_vec = NULL, - (PTR) 0 /* Backend_data. */ + NULL /* Backend_data. */ };