xref: /netbsd-src/external/gpl3/binutils.old/dist/bfd/hpux-core.c (revision e992f068c547fd6e84b3f104dc2340adcc955732)
175fd0b74Schristos /* BFD back-end for HP/UX core files.
2*e992f068Schristos    Copyright (C) 1993-2022 Free Software Foundation, Inc.
375fd0b74Schristos    Written by Stu Grossman, Cygnus Support.
475fd0b74Schristos    Converted to back-end form by Ian Lance Taylor, Cygnus SUpport
575fd0b74Schristos 
675fd0b74Schristos    This file is part of BFD, the Binary File Descriptor library.
775fd0b74Schristos 
875fd0b74Schristos    This program is free software; you can redistribute it and/or modify
975fd0b74Schristos    it under the terms of the GNU General Public License as published by
1075fd0b74Schristos    the Free Software Foundation; either version 3 of the License, or
1175fd0b74Schristos    (at your option) any later version.
1275fd0b74Schristos 
1375fd0b74Schristos    This program is distributed in the hope that it will be useful,
1475fd0b74Schristos    but WITHOUT ANY WARRANTY; without even the implied warranty of
1575fd0b74Schristos    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1675fd0b74Schristos    GNU General Public License for more details.
1775fd0b74Schristos 
1875fd0b74Schristos    You should have received a copy of the GNU General Public License
1975fd0b74Schristos    along with this program; if not, write to the Free Software
2075fd0b74Schristos    Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
2175fd0b74Schristos    MA 02110-1301, USA.  */
2275fd0b74Schristos 
2375fd0b74Schristos 
2475fd0b74Schristos /* This file can only be compiled on systems which use HP/UX style
2575fd0b74Schristos    core files.  */
2675fd0b74Schristos 
2775fd0b74Schristos #include "sysdep.h"
2875fd0b74Schristos #include "bfd.h"
2975fd0b74Schristos #include "libbfd.h"
3075fd0b74Schristos 
31ede78133Schristos #if defined (HOST_HPPAHPUX) || defined (HOST_HPPAMPEIX)
3275fd0b74Schristos 
3375fd0b74Schristos /* FIXME: sys/core.h doesn't exist for HPUX version 7.  HPUX version
3475fd0b74Schristos    5, 6, and 7 core files seem to be standard trad-core.c type core
3575fd0b74Schristos    files; can we just use trad-core.c in addition to this file?  */
3675fd0b74Schristos 
3775fd0b74Schristos #include <sys/core.h>
3875fd0b74Schristos #include <sys/utsname.h>
3975fd0b74Schristos 
4075fd0b74Schristos #endif /* HOST_HPPAHPUX */
4175fd0b74Schristos 
4275fd0b74Schristos #ifdef HOST_HPPABSD
4375fd0b74Schristos 
4475fd0b74Schristos /* Not a very swift place to put it, but that's where the BSD port
4575fd0b74Schristos    puts them.  */
4675fd0b74Schristos #include "/hpux/usr/include/sys/core.h"
4775fd0b74Schristos 
4875fd0b74Schristos #endif /* HOST_HPPABSD */
4975fd0b74Schristos 
5075fd0b74Schristos #include <sys/param.h>
5175fd0b74Schristos #include <dirent.h>
5275fd0b74Schristos #include <signal.h>
5375fd0b74Schristos #ifdef HPUX_CORE
5475fd0b74Schristos #include <machine/reg.h>
5575fd0b74Schristos #endif
5675fd0b74Schristos #include <sys/file.h>
5775fd0b74Schristos 
5875fd0b74Schristos /* Kludge: There's no explicit mechanism provided by sys/core.h to
5975fd0b74Schristos    conditionally know whether a proc_info has thread id fields.
6075fd0b74Schristos    However, CORE_ANON_SHMEM shows up first at 10.30, which is
6175fd0b74Schristos    happily also when meaningful thread id's show up in proc_info. */
6275fd0b74Schristos #if defined(CORE_ANON_SHMEM)
6375fd0b74Schristos #define PROC_INFO_HAS_THREAD_ID (1)
6475fd0b74Schristos #endif
6575fd0b74Schristos 
6675fd0b74Schristos /* This type appears at HP-UX 10.30.  Defining it if not defined
6775fd0b74Schristos    by sys/core.h allows us to build for older HP-UX's, and (since
6875fd0b74Schristos    it won't be encountered in core-dumps from older HP-UX's) is
6975fd0b74Schristos    harmless. */
7075fd0b74Schristos #if !defined(CORE_ANON_SHMEM)
7175fd0b74Schristos #define CORE_ANON_SHMEM 0x00000200	   /* anonymous shared memory */
7275fd0b74Schristos #endif
7375fd0b74Schristos 
7475fd0b74Schristos /* These are stored in the bfd's tdata */
7575fd0b74Schristos 
7675fd0b74Schristos /* .lwpid and .user_tid are only valid if PROC_INFO_HAS_THREAD_ID, else they
7775fd0b74Schristos    are set to 0.  Also, until HP-UX implements MxN threads, .user_tid and
7875fd0b74Schristos    .lwpid are synonymous. */
7975fd0b74Schristos struct hpux_core_struct
8075fd0b74Schristos {
8175fd0b74Schristos   int sig;
8275fd0b74Schristos   int lwpid;		   /* Kernel thread ID. */
8375fd0b74Schristos   unsigned long user_tid;  /* User thread ID. */
8475fd0b74Schristos   char cmd[MAXCOMLEN + 1];
8575fd0b74Schristos };
8675fd0b74Schristos 
8775fd0b74Schristos #define core_hdr(bfd) ((bfd)->tdata.hpux_core_data)
8875fd0b74Schristos #define core_signal(bfd) (core_hdr(bfd)->sig)
8975fd0b74Schristos #define core_command(bfd) (core_hdr(bfd)->cmd)
9075fd0b74Schristos #define core_kernel_thread_id(bfd) (core_hdr(bfd)->lwpid)
9175fd0b74Schristos #define core_user_thread_id(bfd) (core_hdr(bfd)->user_tid)
9275fd0b74Schristos #define hpux_core_core_file_matches_executable_p generic_core_file_matches_executable_p
9375fd0b74Schristos #define hpux_core_core_file_pid _bfd_nocore_core_file_pid
9475fd0b74Schristos 
9575fd0b74Schristos static asection *make_bfd_asection (bfd *, const char *, flagword,
9675fd0b74Schristos 				    bfd_size_type, bfd_vma, unsigned int);
97*e992f068Schristos static bfd_cleanup hpux_core_core_file_p (bfd *);
9875fd0b74Schristos static char *hpux_core_core_file_failing_command (bfd *);
9975fd0b74Schristos static int hpux_core_core_file_failing_signal (bfd *);
10075fd0b74Schristos static void swap_abort (void);
10175fd0b74Schristos 
10275fd0b74Schristos static asection *
make_bfd_asection(bfd * abfd,const char * name,flagword flags,bfd_size_type size,bfd_vma vma,unsigned int alignment_power)10375fd0b74Schristos make_bfd_asection (bfd *abfd, const char *name, flagword flags,
10475fd0b74Schristos 		   bfd_size_type size, bfd_vma vma,
10575fd0b74Schristos 		   unsigned int alignment_power)
10675fd0b74Schristos {
10775fd0b74Schristos   asection *asect;
10875fd0b74Schristos   char *newname;
10975fd0b74Schristos 
11075fd0b74Schristos   newname = bfd_alloc (abfd, (bfd_size_type) strlen (name) + 1);
11175fd0b74Schristos   if (!newname)
11275fd0b74Schristos     return NULL;
11375fd0b74Schristos 
11475fd0b74Schristos   strcpy (newname, name);
11575fd0b74Schristos 
11675fd0b74Schristos   asect = bfd_make_section_anyway_with_flags (abfd, newname, flags);
11775fd0b74Schristos   if (!asect)
11875fd0b74Schristos     return NULL;
11975fd0b74Schristos 
12075fd0b74Schristos   asect->size = size;
12175fd0b74Schristos   asect->vma = vma;
12275fd0b74Schristos   asect->filepos = bfd_tell (abfd);
12375fd0b74Schristos   asect->alignment_power = alignment_power;
12475fd0b74Schristos 
12575fd0b74Schristos   return asect;
12675fd0b74Schristos }
12775fd0b74Schristos 
12875fd0b74Schristos /* Return true if the given core file section corresponds to a thread,
12975fd0b74Schristos    based on its name.  */
13075fd0b74Schristos 
13175fd0b74Schristos static int
thread_section_p(bfd * abfd ATTRIBUTE_UNUSED,asection * sect,void * obj ATTRIBUTE_UNUSED)13275fd0b74Schristos thread_section_p (bfd *abfd ATTRIBUTE_UNUSED,
13375fd0b74Schristos 		  asection *sect,
13475fd0b74Schristos 		  void *obj ATTRIBUTE_UNUSED)
13575fd0b74Schristos {
136*e992f068Schristos   return startswith (sect->name, ".reg/");
13775fd0b74Schristos }
13875fd0b74Schristos 
13975fd0b74Schristos /* this function builds a bfd target if the file is a corefile.
14075fd0b74Schristos    It returns null or 0 if it finds out thaat it is not a core file.
14175fd0b74Schristos    The way it checks this is by looking for allowed 'type' field values.
14275fd0b74Schristos    These are declared in sys/core.h
14375fd0b74Schristos    There are some values which are 'reserved for future use'. In particular
14475fd0b74Schristos    CORE_NONE is actually defined as 0. This may be a catch-all for cases
14575fd0b74Schristos    in which the core file is generated by some non-hpux application.
14675fd0b74Schristos    (I am just guessing here!)
14775fd0b74Schristos */
148*e992f068Schristos static bfd_cleanup
hpux_core_core_file_p(bfd * abfd)14975fd0b74Schristos hpux_core_core_file_p (bfd *abfd)
15075fd0b74Schristos {
15175fd0b74Schristos   int  good_sections = 0;
15275fd0b74Schristos   int  unknown_sections = 0;
15375fd0b74Schristos 
15475fd0b74Schristos   core_hdr (abfd) = (struct hpux_core_struct *)
15575fd0b74Schristos     bfd_zalloc (abfd, (bfd_size_type) sizeof (struct hpux_core_struct));
15675fd0b74Schristos   if (!core_hdr (abfd))
15775fd0b74Schristos     return NULL;
15875fd0b74Schristos 
15975fd0b74Schristos   while (1)
16075fd0b74Schristos     {
16175fd0b74Schristos       int val;
16275fd0b74Schristos       struct corehead core_header;
16375fd0b74Schristos 
16475fd0b74Schristos       val = bfd_bread ((void *) &core_header,
16575fd0b74Schristos 		      (bfd_size_type) sizeof core_header, abfd);
16675fd0b74Schristos       if (val <= 0)
16775fd0b74Schristos 	break;
16875fd0b74Schristos       switch (core_header.type)
16975fd0b74Schristos 	{
17075fd0b74Schristos 	case CORE_KERNEL:
17175fd0b74Schristos 	case CORE_FORMAT:
17275fd0b74Schristos 	  /* Just skip this.  */
17375fd0b74Schristos 	  bfd_seek (abfd, (file_ptr) core_header.len, SEEK_CUR);
17475fd0b74Schristos 	  good_sections++;
17575fd0b74Schristos 	  break;
17675fd0b74Schristos 	case CORE_EXEC:
17775fd0b74Schristos 	  {
17875fd0b74Schristos 	    struct proc_exec proc_exec;
17975fd0b74Schristos 	    if (bfd_bread ((void *) &proc_exec, (bfd_size_type) core_header.len,
18075fd0b74Schristos 			  abfd) != core_header.len)
18175fd0b74Schristos 	      break;
18275fd0b74Schristos 	    strncpy (core_command (abfd), proc_exec.cmd, MAXCOMLEN + 1);
18375fd0b74Schristos 	    good_sections++;
18475fd0b74Schristos 	  }
18575fd0b74Schristos 	  break;
18675fd0b74Schristos 	case CORE_PROC:
18775fd0b74Schristos 	  {
18875fd0b74Schristos 	    struct proc_info proc_info;
18975fd0b74Schristos 	    char  secname[100];  /* Of arbitrary size, but plenty large. */
19075fd0b74Schristos 
19175fd0b74Schristos 	    /* We need to read this section, 'cause we need to determine
19275fd0b74Schristos 	       whether the core-dumped app was threaded before we create
19375fd0b74Schristos 	       any .reg sections. */
19475fd0b74Schristos 	    if (bfd_bread (&proc_info, (bfd_size_type) core_header.len, abfd)
19575fd0b74Schristos 		!= core_header.len)
19675fd0b74Schristos 	      break;
19775fd0b74Schristos 
19875fd0b74Schristos 	      /* However, we also want to create those sections with the
19975fd0b74Schristos 		 file positioned at the start of the record, it seems. */
20075fd0b74Schristos 	    if (bfd_seek (abfd, -((file_ptr) core_header.len), SEEK_CUR) != 0)
20175fd0b74Schristos 	      break;
20275fd0b74Schristos 
20375fd0b74Schristos #if defined(PROC_INFO_HAS_THREAD_ID)
20475fd0b74Schristos 	    core_kernel_thread_id (abfd) = proc_info.lwpid;
20575fd0b74Schristos 	    core_user_thread_id (abfd) = proc_info.user_tid;
20675fd0b74Schristos #else
20775fd0b74Schristos 	    core_kernel_thread_id (abfd) = 0;
20875fd0b74Schristos 	    core_user_thread_id (abfd) = 0;
20975fd0b74Schristos #endif
21075fd0b74Schristos 	    /* If the program was unthreaded, then we'll just create a
21175fd0b74Schristos 	       .reg section.
21275fd0b74Schristos 
21375fd0b74Schristos 	       If the program was threaded, then we'll create .reg/XXXXX
21475fd0b74Schristos 	       section for each thread, where XXXXX is a printable
21575fd0b74Schristos 	       representation of the kernel thread id.  We'll also
21675fd0b74Schristos 	       create a .reg section for the thread that was running
21775fd0b74Schristos 	       and signalled at the time of the core-dump (i.e., this
21875fd0b74Schristos 	       is effectively an alias, needed to keep GDB happy.)
21975fd0b74Schristos 
22075fd0b74Schristos 	       Note that we use `.reg/XXXXX' as opposed to '.regXXXXX'
22175fd0b74Schristos 	       because GDB expects that .reg2 will be the floating-
22275fd0b74Schristos 	       point registers. */
22375fd0b74Schristos 	    if (core_kernel_thread_id (abfd) == 0)
22475fd0b74Schristos 	      {
22575fd0b74Schristos 		if (!make_bfd_asection (abfd, ".reg",
22675fd0b74Schristos 					SEC_HAS_CONTENTS,
22775fd0b74Schristos 					core_header.len,
22875fd0b74Schristos 					(bfd_vma) offsetof (struct proc_info,
22975fd0b74Schristos 							    hw_regs),
23075fd0b74Schristos 					2))
23175fd0b74Schristos 		  goto fail;
23275fd0b74Schristos 	      }
23375fd0b74Schristos 	    else
23475fd0b74Schristos 	      {
23575fd0b74Schristos 		/* There are threads.  Is this the one that caused the
23675fd0b74Schristos 		   core-dump?  We'll claim it was the running thread. */
23775fd0b74Schristos 		if (proc_info.sig != -1)
23875fd0b74Schristos 		  {
23975fd0b74Schristos 		    if (!make_bfd_asection (abfd, ".reg",
24075fd0b74Schristos 					    SEC_HAS_CONTENTS,
24175fd0b74Schristos 					    core_header.len,
24275fd0b74Schristos 					    (bfd_vma)offsetof (struct proc_info,
24375fd0b74Schristos 							       hw_regs),
24475fd0b74Schristos 					    2))
24575fd0b74Schristos 		      goto fail;
24675fd0b74Schristos 		  }
24775fd0b74Schristos 		/* We always make one of these sections, for every thread. */
24875fd0b74Schristos 		sprintf (secname, ".reg/%d", core_kernel_thread_id (abfd));
24975fd0b74Schristos 		if (!make_bfd_asection (abfd, secname,
25075fd0b74Schristos 					SEC_HAS_CONTENTS,
25175fd0b74Schristos 					core_header.len,
25275fd0b74Schristos 					(bfd_vma) offsetof (struct proc_info,
25375fd0b74Schristos 							    hw_regs),
25475fd0b74Schristos 					2))
25575fd0b74Schristos 		  goto fail;
25675fd0b74Schristos 	      }
25775fd0b74Schristos 	    core_signal (abfd) = proc_info.sig;
25875fd0b74Schristos 	    if (bfd_seek (abfd, (file_ptr) core_header.len, SEEK_CUR) != 0)
25975fd0b74Schristos 	      break;
26075fd0b74Schristos 	    good_sections++;
26175fd0b74Schristos 	  }
26275fd0b74Schristos 	  break;
26375fd0b74Schristos 
26475fd0b74Schristos 	case CORE_DATA:
26575fd0b74Schristos 	case CORE_STACK:
26675fd0b74Schristos 	case CORE_TEXT:
26775fd0b74Schristos 	case CORE_MMF:
26875fd0b74Schristos 	case CORE_SHM:
26975fd0b74Schristos 	case CORE_ANON_SHMEM:
27075fd0b74Schristos 	  if (!make_bfd_asection (abfd, ".data",
27175fd0b74Schristos 				  SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS,
27275fd0b74Schristos 				  core_header.len,
27375fd0b74Schristos 				  (bfd_vma) core_header.addr, 2))
27475fd0b74Schristos 	    goto fail;
27575fd0b74Schristos 
27675fd0b74Schristos 	  bfd_seek (abfd, (file_ptr) core_header.len, SEEK_CUR);
27775fd0b74Schristos 	  good_sections++;
27875fd0b74Schristos 	  break;
27975fd0b74Schristos 
28075fd0b74Schristos 	case CORE_NONE:
28175fd0b74Schristos 	  /* Let's not punt if we encounter a section of unknown
28275fd0b74Schristos 	     type.  Rather, let's make a note of it.  If we later
28375fd0b74Schristos 	     see that there were also "good" sections, then we'll
28475fd0b74Schristos 	     declare that this a core file, but we'll also warn that
28575fd0b74Schristos 	     it may be incompatible with this gdb.
28675fd0b74Schristos 	     */
28775fd0b74Schristos 	  unknown_sections++;
28875fd0b74Schristos 	  break;
28975fd0b74Schristos 
29075fd0b74Schristos 	 default:
29175fd0b74Schristos 	   goto fail; /*unrecognized core file type */
29275fd0b74Schristos 	}
29375fd0b74Schristos     }
29475fd0b74Schristos 
29575fd0b74Schristos   /* OK, we believe you.  You're a core file (sure, sure).  */
29675fd0b74Schristos 
29775fd0b74Schristos   /* On HP/UX, we sometimes encounter core files where none of the threads
29875fd0b74Schristos      was found to be the running thread (ie the signal was set to -1 for
29975fd0b74Schristos      all threads).  This happens when the program was aborted externally
30075fd0b74Schristos      via a TT_CORE ttrace system call.  In that case, we just pick one
30175fd0b74Schristos      thread at random to be the active thread.  */
30275fd0b74Schristos   if (core_kernel_thread_id (abfd) != 0
30375fd0b74Schristos       && bfd_get_section_by_name (abfd, ".reg") == NULL)
30475fd0b74Schristos     {
30575fd0b74Schristos       asection *asect = bfd_sections_find_if (abfd, thread_section_p, NULL);
30675fd0b74Schristos       asection *reg_sect;
30775fd0b74Schristos 
30875fd0b74Schristos       if (asect != NULL)
30975fd0b74Schristos 	{
31075fd0b74Schristos 	  reg_sect = make_bfd_asection (abfd, ".reg", asect->flags,
31175fd0b74Schristos 					asect->size, asect->vma,
31275fd0b74Schristos 					asect->alignment_power);
31375fd0b74Schristos 	  if (reg_sect == NULL)
31475fd0b74Schristos 	    goto fail;
31575fd0b74Schristos 
31675fd0b74Schristos 	  reg_sect->filepos = asect->filepos;
31775fd0b74Schristos 	}
31875fd0b74Schristos     }
31975fd0b74Schristos 
32075fd0b74Schristos   /* Were there sections of unknown type?  If so, yet there were
32175fd0b74Schristos      at least some complete sections of known type, then, issue
32275fd0b74Schristos      a warning.  Possibly the core file was generated on a version
32375fd0b74Schristos      of HP-UX that is incompatible with that for which this gdb was
32475fd0b74Schristos      built.
32575fd0b74Schristos      */
32675fd0b74Schristos   if ((unknown_sections > 0) && (good_sections > 0))
327ede78133Schristos     _bfd_error_handler
328ede78133Schristos       ("%pB appears to be a core file,\nbut contains unknown sections."
329ede78133Schristos        "  It may have been created on an incompatible\nversion of HP-UX."
330ede78133Schristos        "  As a result, some information may be unavailable.\n",
331ede78133Schristos        abfd);
33275fd0b74Schristos 
333*e992f068Schristos   return _bfd_no_cleanup;
33475fd0b74Schristos 
33575fd0b74Schristos  fail:
33675fd0b74Schristos   bfd_release (abfd, core_hdr (abfd));
33775fd0b74Schristos   core_hdr (abfd) = NULL;
33875fd0b74Schristos   bfd_section_list_clear (abfd);
33975fd0b74Schristos   return NULL;
34075fd0b74Schristos }
34175fd0b74Schristos 
34275fd0b74Schristos static char *
hpux_core_core_file_failing_command(bfd * abfd)34375fd0b74Schristos hpux_core_core_file_failing_command (bfd *abfd)
34475fd0b74Schristos {
34575fd0b74Schristos   return core_command (abfd);
34675fd0b74Schristos }
34775fd0b74Schristos 
34875fd0b74Schristos static int
hpux_core_core_file_failing_signal(bfd * abfd)34975fd0b74Schristos hpux_core_core_file_failing_signal (bfd *abfd)
35075fd0b74Schristos {
35175fd0b74Schristos   return core_signal (abfd);
35275fd0b74Schristos }
35375fd0b74Schristos 
35475fd0b74Schristos 
35575fd0b74Schristos /* If somebody calls any byte-swapping routines, shoot them.  */
35675fd0b74Schristos static void
swap_abort(void)35775fd0b74Schristos swap_abort (void)
35875fd0b74Schristos {
35975fd0b74Schristos   abort(); /* This way doesn't require any declaration for ANSI to fuck up */
36075fd0b74Schristos }
36175fd0b74Schristos 
36275fd0b74Schristos #define	NO_GET ((bfd_vma (*) (const void *)) swap_abort)
36375fd0b74Schristos #define	NO_PUT ((void (*) (bfd_vma, void *)) swap_abort)
36475fd0b74Schristos #define	NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort)
365*e992f068Schristos #define	NO_GET64 ((uint64_t (*) (const void *)) swap_abort)
366*e992f068Schristos #define	NO_PUT64 ((void (*) (uint64_t, void *)) swap_abort)
367*e992f068Schristos #define	NO_GETS64 ((int64_t (*) (const void *)) swap_abort)
36875fd0b74Schristos 
36975fd0b74Schristos const bfd_target core_hpux_vec =
37075fd0b74Schristos   {
37175fd0b74Schristos     "hpux-core",
37275fd0b74Schristos     bfd_target_unknown_flavour,
37375fd0b74Schristos     BFD_ENDIAN_BIG,		/* target byte order */
37475fd0b74Schristos     BFD_ENDIAN_BIG,		/* target headers byte order */
37575fd0b74Schristos     (HAS_RELOC | EXEC_P |	/* object flags */
37675fd0b74Schristos      HAS_LINENO | HAS_DEBUG |
37775fd0b74Schristos      HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
37875fd0b74Schristos     (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
37975fd0b74Schristos     0,				/* symbol prefix */
38075fd0b74Schristos     ' ',			/* ar_pad_char */
38175fd0b74Schristos     16,				/* ar_max_namelen */
38275fd0b74Schristos     0,				/* match priority.  */
383*e992f068Schristos     TARGET_KEEP_UNUSED_SECTION_SYMBOLS, /* keep unused section symbols.  */
38475fd0b74Schristos     NO_GET64, NO_GETS64, NO_PUT64,	/* 64 bit data */
38575fd0b74Schristos     NO_GET, NO_GETS, NO_PUT,		/* 32 bit data */
38675fd0b74Schristos     NO_GET, NO_GETS, NO_PUT,		/* 16 bit data */
38775fd0b74Schristos     NO_GET64, NO_GETS64, NO_PUT64,	/* 64 bit hdrs */
38875fd0b74Schristos     NO_GET, NO_GETS, NO_PUT,		/* 32 bit hdrs */
38975fd0b74Schristos     NO_GET, NO_GETS, NO_PUT,		/* 16 bit hdrs */
39075fd0b74Schristos 
39175fd0b74Schristos     {				/* bfd_check_format */
39275fd0b74Schristos       _bfd_dummy_target,		/* unknown format */
39375fd0b74Schristos       _bfd_dummy_target,		/* object file */
39475fd0b74Schristos       _bfd_dummy_target,		/* archive */
39575fd0b74Schristos       hpux_core_core_file_p		/* a core file */
39675fd0b74Schristos     },
39775fd0b74Schristos     {				/* bfd_set_format */
398ede78133Schristos       _bfd_bool_bfd_false_error,
399ede78133Schristos       _bfd_bool_bfd_false_error,
400ede78133Schristos       _bfd_bool_bfd_false_error,
401ede78133Schristos       _bfd_bool_bfd_false_error
40275fd0b74Schristos     },
40375fd0b74Schristos     {				/* bfd_write_contents */
404ede78133Schristos       _bfd_bool_bfd_false_error,
405ede78133Schristos       _bfd_bool_bfd_false_error,
406ede78133Schristos       _bfd_bool_bfd_false_error,
407ede78133Schristos       _bfd_bool_bfd_false_error
40875fd0b74Schristos     },
40975fd0b74Schristos 
41075fd0b74Schristos     BFD_JUMP_TABLE_GENERIC (_bfd_generic),
41175fd0b74Schristos     BFD_JUMP_TABLE_COPY (_bfd_generic),
41275fd0b74Schristos     BFD_JUMP_TABLE_CORE (hpux_core),
41375fd0b74Schristos     BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
41475fd0b74Schristos     BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
41575fd0b74Schristos     BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
41675fd0b74Schristos     BFD_JUMP_TABLE_WRITE (_bfd_generic),
41775fd0b74Schristos     BFD_JUMP_TABLE_LINK (_bfd_nolink),
41875fd0b74Schristos     BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
41975fd0b74Schristos 
42075fd0b74Schristos     NULL,
42175fd0b74Schristos 
42275fd0b74Schristos     NULL			/* backend_data */
42375fd0b74Schristos   };
424