X-Git-Url: https://git.libre-soc.org/?a=blobdiff_plain;f=bfd%2Fhpux-core.c;h=4f03b84909ab41a0a1e16227be6fb18ed6e5292c;hb=d218dba3f491191322e50df74376faa11c4a9f6b;hp=36a17dc9d9acdc03611d308b8b6739d7c1c04a0c;hpb=b3adc24a0713411ab38a21dc894dd40dbc5c8f4f;p=binutils-gdb.git diff --git a/bfd/hpux-core.c b/bfd/hpux-core.c index 36a17dc9d9a..4f03b84909a 100644 --- a/bfd/hpux-core.c +++ b/bfd/hpux-core.c @@ -1,5 +1,5 @@ /* BFD back-end for HP/UX core files. - Copyright (C) 1993-2020 Free Software Foundation, Inc. + Copyright (C) 1993-2022 Free Software Foundation, Inc. Written by Stu Grossman, Cygnus Support. Converted to back-end form by Ian Lance Taylor, Cygnus SUpport @@ -48,19 +48,7 @@ #endif /* HOST_HPPABSD */ #include -#ifdef HAVE_DIRENT_H -# include -#else -# ifdef HAVE_SYS_NDIR_H -# include -# endif -# ifdef HAVE_SYS_DIR_H -# include -# endif -# ifdef HAVE_NDIR_H -# include -# endif -#endif +#include #include #ifdef HPUX_CORE #include @@ -106,7 +94,7 @@ struct hpux_core_struct static asection *make_bfd_asection (bfd *, const char *, flagword, bfd_size_type, bfd_vma, unsigned int); -static const bfd_target *hpux_core_core_file_p (bfd *); +static bfd_cleanup hpux_core_core_file_p (bfd *); static char *hpux_core_core_file_failing_command (bfd *); static int hpux_core_core_file_failing_signal (bfd *); static void swap_abort (void); @@ -145,7 +133,7 @@ thread_section_p (bfd *abfd ATTRIBUTE_UNUSED, asection *sect, void *obj ATTRIBUTE_UNUSED) { - return CONST_STRNEQ (sect->name, ".reg/"); + return startswith (sect->name, ".reg/"); } /* this function builds a bfd target if the file is a corefile. @@ -157,7 +145,7 @@ thread_section_p (bfd *abfd ATTRIBUTE_UNUSED, in which the core file is generated by some non-hpux application. (I am just guessing here!) */ -static const bfd_target * +static bfd_cleanup hpux_core_core_file_p (bfd *abfd) { int good_sections = 0; @@ -342,7 +330,7 @@ hpux_core_core_file_p (bfd *abfd) " As a result, some information may be unavailable.\n", abfd); - return abfd->xvec; + return _bfd_no_cleanup; fail: bfd_release (abfd, core_hdr (abfd)); @@ -392,6 +380,7 @@ const bfd_target core_hpux_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 */