/* BFD back-end for HP/UX core files.
- Copyright (C) 1993-2018 Free Software Foundation, Inc.
+ Copyright (C) 1993-2021 Free Software Foundation, Inc.
Written by Stu Grossman, Cygnus Support.
Converted to back-end form by Ian Lance Taylor, Cygnus SUpport
#include "bfd.h"
#include "libbfd.h"
-#if defined (HOST_HPPAHPUX) || defined (HOST_HP300HPUX) || defined (HOST_HPPAMPEIX)
+#if defined (HOST_HPPAHPUX) || defined (HOST_HPPAMPEIX)
/* FIXME: sys/core.h doesn't exist for HPUX version 7. HPUX version
5, 6, and 7 core files seem to be standard trad-core.c type core
#endif /* HOST_HPPABSD */
#include <sys/param.h>
-#ifdef HAVE_DIRENT_H
-# include <dirent.h>
-#else
-# ifdef HAVE_SYS_NDIR_H
-# include <sys/ndir.h>
-# endif
-# ifdef HAVE_SYS_DIR_H
-# include <sys/dir.h>
-# endif
-# ifdef HAVE_NDIR_H
-# include <ndir.h>
-# endif
-#endif
+#include <dirent.h>
#include <signal.h>
#ifdef HPUX_CORE
#include <machine/reg.h>
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);
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.
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;
*/
if ((unknown_sections > 0) && (good_sections > 0))
_bfd_error_handler
- ("%B appears to be a core file,\nbut contains unknown sections."
+ ("%pB appears to be a core file,\nbut contains unknown sections."
" It may have been created on an incompatible\nversion of HP-UX."
" As a result, some information may be unavailable.\n",
abfd);
- return abfd->xvec;
+ return _bfd_no_cleanup;
fail:
bfd_release (abfd, core_hdr (abfd));
' ', /* 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 */
hpux_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),