xref: /openbsd-src/gnu/usr.bin/binutils/bfd/sco5-core.c (revision cf2f2c5620d6d9a4fd01930983c4b9a1f76d7aa3)
1f7cc78ecSespie /* BFD back end for SCO5 core files (U-area and raw sections)
2*cf2f2c56Smiod    Copyright 1998, 1999, 2000, 2001, 2002, 2003, 2004
3*cf2f2c56Smiod    Free Software Foundation, Inc.
4f7cc78ecSespie    Written by Jouke Numan <jnuman@hiscom.nl>
5f7cc78ecSespie 
6f7cc78ecSespie This file is part of BFD, the Binary File Descriptor library.
7f7cc78ecSespie 
8f7cc78ecSespie This program is free software; you can redistribute it and/or modify
9f7cc78ecSespie it under the terms of the GNU General Public License as published by
10f7cc78ecSespie the Free Software Foundation; either version 2 of the License, or
11f7cc78ecSespie (at your option) any later version.
12f7cc78ecSespie 
13f7cc78ecSespie This program is distributed in the hope that it will be useful,
14f7cc78ecSespie but WITHOUT ANY WARRANTY; without even the implied warranty of
15f7cc78ecSespie MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16f7cc78ecSespie GNU General Public License for more details.
17f7cc78ecSespie 
18f7cc78ecSespie You should have received a copy of the GNU General Public License
19f7cc78ecSespie along with this program; if not, write to the Free Software
20f7cc78ecSespie Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
21f7cc78ecSespie 
22f7cc78ecSespie #include "bfd.h"
23f7cc78ecSespie #include "sysdep.h"
24f7cc78ecSespie #include "libbfd.h"
25f7cc78ecSespie #include "libaout.h"		/* BFD a.out internal data structures */
26f7cc78ecSespie 
27f7cc78ecSespie #include <stdio.h>
28f7cc78ecSespie #include <sys/types.h>
29f7cc78ecSespie #include <sys/param.h>
30f7cc78ecSespie #include <sys/dir.h>
31f7cc78ecSespie #include <signal.h>
32f7cc78ecSespie 
33f7cc78ecSespie #include <sys/user.h>		/* After a.out.h  */
34f7cc78ecSespie #include <sys/paccess.h>
35f7cc78ecSespie #include <sys/region.h>
36f7cc78ecSespie 
37f7cc78ecSespie struct sco5_core_struct
38f7cc78ecSespie {
39f7cc78ecSespie   struct user u;
40f7cc78ecSespie };
41f7cc78ecSespie 
42f7cc78ecSespie /* forward declarations */
43f7cc78ecSespie 
44d2201f2fSdrahn static asection *make_bfd_asection
45d2201f2fSdrahn   PARAMS ((bfd *, const char *, flagword, bfd_size_type, bfd_vma, file_ptr));
46f7cc78ecSespie static struct user *read_uarea PARAMS ((bfd *, int));
47f7cc78ecSespie const bfd_target *sco5_core_file_p PARAMS ((bfd *abfd));
48f7cc78ecSespie char *sco5_core_file_failing_command PARAMS ((bfd *abfd));
49f7cc78ecSespie int sco5_core_file_failing_signal PARAMS ((bfd *abfd));
50d2201f2fSdrahn bfd_boolean sco5_core_file_matches_executable_p
51d2201f2fSdrahn   PARAMS ((bfd *core_bfd, bfd *exec_bfd));
52f7cc78ecSespie static void swap_abort PARAMS ((void));
53f7cc78ecSespie 
54f7cc78ecSespie static asection *
make_bfd_asection(abfd,name,flags,_raw_size,vma,filepos)55f7cc78ecSespie make_bfd_asection (abfd, name, flags, _raw_size, vma, filepos)
56f7cc78ecSespie      bfd *abfd;
57f7cc78ecSespie      const char *name;
58f7cc78ecSespie      flagword flags;
59f7cc78ecSespie      bfd_size_type _raw_size;
60f7cc78ecSespie      bfd_vma vma;
61f7cc78ecSespie      file_ptr filepos;
62f7cc78ecSespie {
63f7cc78ecSespie   asection *asect;
64f7cc78ecSespie 
65f7cc78ecSespie   asect = bfd_make_section_anyway (abfd, name);
66f7cc78ecSespie   if (!asect)
67f7cc78ecSespie     return NULL;
68f7cc78ecSespie   asect->flags = flags;
69f7cc78ecSespie   asect->_raw_size = _raw_size;
70f7cc78ecSespie   asect->vma = vma;
71f7cc78ecSespie   asect->filepos = filepos;
72f7cc78ecSespie   asect->alignment_power = 2;
73f7cc78ecSespie 
74f7cc78ecSespie   return asect;
75f7cc78ecSespie }
76f7cc78ecSespie 
77f7cc78ecSespie static struct user *
read_uarea(abfd,filepos)78f7cc78ecSespie read_uarea(abfd, filepos)
79f7cc78ecSespie      bfd *abfd;
80f7cc78ecSespie      int filepos;
81f7cc78ecSespie 
82f7cc78ecSespie {
83f7cc78ecSespie   struct sco5_core_struct *rawptr;
84d2201f2fSdrahn   bfd_size_type amt = sizeof (struct sco5_core_struct);
85f7cc78ecSespie 
86d2201f2fSdrahn   rawptr = (struct sco5_core_struct *) bfd_zmalloc (amt);
87f7cc78ecSespie   if (rawptr == NULL)
88f7cc78ecSespie     return NULL;
89f7cc78ecSespie 
90f7cc78ecSespie   abfd->tdata.sco5_core_data = rawptr;
91f7cc78ecSespie 
92d2201f2fSdrahn   if (bfd_seek (abfd, (file_ptr) filepos, SEEK_SET) != 0
93d2201f2fSdrahn       || bfd_bread ((void *) &rawptr->u, (bfd_size_type) sizeof rawptr->u,
94d2201f2fSdrahn 		   abfd) != sizeof rawptr->u)
95f7cc78ecSespie     {
96f7cc78ecSespie       bfd_set_error (bfd_error_wrong_format);
97f7cc78ecSespie       return NULL;
98f7cc78ecSespie     }
99f7cc78ecSespie 
100f7cc78ecSespie   /* Sanity check perhaps??? */
101f7cc78ecSespie   if (rawptr->u.u_dsize > 0x1000000)    /* Remember, it's in pages...  */
102f7cc78ecSespie     {
103f7cc78ecSespie       bfd_set_error (bfd_error_wrong_format);
104f7cc78ecSespie       return NULL;
105f7cc78ecSespie     }
106f7cc78ecSespie   if (rawptr->u.u_ssize > 0x1000000)
107f7cc78ecSespie     {
108f7cc78ecSespie       bfd_set_error (bfd_error_wrong_format);
109f7cc78ecSespie       return NULL;
110f7cc78ecSespie     }
111f7cc78ecSespie   return &rawptr->u;
112f7cc78ecSespie }
113f7cc78ecSespie 
114f7cc78ecSespie const bfd_target *
sco5_core_file_p(abfd)115f7cc78ecSespie sco5_core_file_p (abfd)
116f7cc78ecSespie      bfd *abfd;
117f7cc78ecSespie {
118f7cc78ecSespie   int coffset_siz, val, nsecs, cheadoffs;
119f7cc78ecSespie   int coresize;
120f7cc78ecSespie   struct user *u;
121f7cc78ecSespie   struct coreoffsets coffsets;
122f7cc78ecSespie   struct coresecthead chead;
123f7cc78ecSespie   char *secname;
124f7cc78ecSespie   flagword flags;
125f7cc78ecSespie 
126f7cc78ecSespie   /* Read coreoffsets region at end of core (see core(FP)) */
127f7cc78ecSespie 
128f7cc78ecSespie   {
129f7cc78ecSespie     FILE *stream = bfd_cache_lookup (abfd);
130f7cc78ecSespie     struct stat statbuf;
131f7cc78ecSespie     if (stream == NULL)
132f7cc78ecSespie       return NULL;
133f7cc78ecSespie     if (fstat (fileno (stream), &statbuf) < 0)
134f7cc78ecSespie       {
135f7cc78ecSespie 	bfd_set_error (bfd_error_system_call);
136f7cc78ecSespie 	return NULL;
137f7cc78ecSespie       }
138f7cc78ecSespie     coresize = statbuf.st_size;
139f7cc78ecSespie   }
140f7cc78ecSespie   /* Last long in core is sizeof struct coreoffsets, read it */
141d2201f2fSdrahn   if ((bfd_seek (abfd, (file_ptr) (coresize - sizeof coffset_siz),
142d2201f2fSdrahn 		 SEEK_SET) != 0)
143d2201f2fSdrahn       || bfd_bread ((void *) &coffset_siz, (bfd_size_type) sizeof coffset_siz,
144d2201f2fSdrahn 		   abfd) != sizeof coffset_siz)
145f7cc78ecSespie     {
146f7cc78ecSespie       bfd_set_error (bfd_error_wrong_format);
147f7cc78ecSespie       return NULL;
148f7cc78ecSespie     }
149f7cc78ecSespie 
150f7cc78ecSespie   /* Use it to seek start of coreoffsets region, read it and determine
151f7cc78ecSespie      validity */
152d2201f2fSdrahn   if ((bfd_seek (abfd, (file_ptr) (coresize - coffset_siz), SEEK_SET) != 0)
153d2201f2fSdrahn       || (bfd_bread ((void *) &coffsets, (bfd_size_type) sizeof coffsets, abfd)
154f7cc78ecSespie 	  != sizeof coffsets)
155f7cc78ecSespie       || ((coffsets.u_info != 1) && (coffsets.u_info != C_VERSION)))
156f7cc78ecSespie     {
157f7cc78ecSespie       bfd_set_error (bfd_error_wrong_format);
158f7cc78ecSespie       return NULL;
159f7cc78ecSespie     }
160f7cc78ecSespie 
161f7cc78ecSespie   if (coffsets.u_info == 1)
162f7cc78ecSespie     {
163f7cc78ecSespie       /* Old version, no section heads, read info from user struct */
164f7cc78ecSespie 
165f7cc78ecSespie       u = read_uarea (abfd, coffsets.u_user);
166f7cc78ecSespie       if (! u)
167d2201f2fSdrahn 	goto fail;
168f7cc78ecSespie 
169f7cc78ecSespie       if (!make_bfd_asection (abfd, ".reg", SEC_HAS_CONTENTS,
170f7cc78ecSespie 			      (bfd_size_type) coffsets.u_usize,
171f7cc78ecSespie 			      0 - (bfd_vma) u->u_ar0,
172f7cc78ecSespie 			      (file_ptr) coffsets.u_user))
173d2201f2fSdrahn 	goto fail;
174f7cc78ecSespie 
175f7cc78ecSespie       if (!make_bfd_asection (abfd, ".data",
176f7cc78ecSespie 			      SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS,
177f7cc78ecSespie 			      ((bfd_size_type) u->u_exdata.ux_dsize
178f7cc78ecSespie 			       + u->u_exdata.ux_bsize),
179f7cc78ecSespie 			      (bfd_vma) u->u_exdata.ux_datorg,
180f7cc78ecSespie 			      (file_ptr) coffsets.u_data))
181d2201f2fSdrahn 	goto fail;
182f7cc78ecSespie 
183f7cc78ecSespie       if (!make_bfd_asection (abfd, ".stack",
184f7cc78ecSespie 			      SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS,
185f7cc78ecSespie 			      (bfd_size_type) u->u_ssize * NBPC,
186f7cc78ecSespie 			      (bfd_vma) u->u_sub,
187f7cc78ecSespie 			      (file_ptr) coffsets.u_stack))
188d2201f2fSdrahn 	goto fail;
189f7cc78ecSespie 
190f7cc78ecSespie       return abfd->xvec;		/* Done for version 1 */
191f7cc78ecSespie     }
192f7cc78ecSespie 
193f7cc78ecSespie   /* Immediately before coreoffsets region is a long with offset in core
194f7cc78ecSespie      to first coresecthead (CORES_OFFSETS), the long before this is the
195f7cc78ecSespie      number of section heads in the list. Read both longs and read the
196f7cc78ecSespie      coresecthead and check its validity */
197f7cc78ecSespie 
198f7cc78ecSespie   if ((bfd_seek (abfd,
199d2201f2fSdrahn 		 (file_ptr) (coresize - coffset_siz - 2 * sizeof coffset_siz),
200f7cc78ecSespie 		 SEEK_SET) != 0)
201d2201f2fSdrahn       || (bfd_bread ((void *) &nsecs, (bfd_size_type) sizeof nsecs, abfd)
202d2201f2fSdrahn 	  != sizeof nsecs)
203d2201f2fSdrahn       || (bfd_bread ((void *) &cheadoffs, (bfd_size_type) sizeof cheadoffs,
204d2201f2fSdrahn 		    abfd) != sizeof cheadoffs)
205d2201f2fSdrahn       || (bfd_seek (abfd, (file_ptr) cheadoffs, SEEK_SET) != 0)
206d2201f2fSdrahn       || (bfd_bread ((void *) &chead, (bfd_size_type) sizeof chead, abfd)
207d2201f2fSdrahn 	  != sizeof chead)
208f7cc78ecSespie       || (chead.cs_stype != CORES_OFFSETS)
209f7cc78ecSespie       || (chead.cs_x.csx_magic != COREMAGIC_NUMBER))
210f7cc78ecSespie     {
211f7cc78ecSespie       bfd_set_error (bfd_error_wrong_format);
212d2201f2fSdrahn       goto fail;
213f7cc78ecSespie     }
214f7cc78ecSespie 
215f7cc78ecSespie   /* OK, we believe you.  You're a core file (sure, sure).  */
216f7cc78ecSespie 
217f7cc78ecSespie   /* Now loop over all regions and map them */
218f7cc78ecSespie   nsecs--;				/* We've seen CORES_OFFSETS already */
219f7cc78ecSespie   for (; nsecs; nsecs--)
220f7cc78ecSespie     {
221d2201f2fSdrahn       if ((bfd_seek (abfd, (file_ptr) chead.cs_hseek, SEEK_SET) != 0)
222d2201f2fSdrahn 	  || (bfd_bread ((void *) &chead, (bfd_size_type) sizeof chead, abfd)
223d2201f2fSdrahn 	      != sizeof chead))
224f7cc78ecSespie 	{
225f7cc78ecSespie 	  bfd_set_error (bfd_error_wrong_format);
226d2201f2fSdrahn 	  goto fail;
227f7cc78ecSespie 	}
228f7cc78ecSespie 
229f7cc78ecSespie       switch (chead.cs_stype)
230f7cc78ecSespie 	{
231f7cc78ecSespie 	case CORES_MAGIC:			/* Core header, check magic */
232f7cc78ecSespie 	  if (chead.cs_x.csx_magic != COREMAGIC_NUMBER)
233f7cc78ecSespie 	    {
234f7cc78ecSespie 	      bfd_set_error (bfd_error_wrong_format);
235d2201f2fSdrahn 	      goto fail;
236f7cc78ecSespie 	    }
237f7cc78ecSespie 	  secname = NULL;
238f7cc78ecSespie 	  nsecs++;				/* MAGIC not in section cnt!*/
239f7cc78ecSespie 	  break;
240f7cc78ecSespie 	case CORES_UAREA:			/* U-area, read in tdata */
241f7cc78ecSespie 	  u = read_uarea (abfd, chead.cs_sseek);
242f7cc78ecSespie 	  if (! u)
243d2201f2fSdrahn 	    goto fail;
244f7cc78ecSespie 
245f7cc78ecSespie 	  /* This is tricky.  As the "register section", we give them
246f7cc78ecSespie 	     the entire upage and stack.  u.u_ar0 points to where
247f7cc78ecSespie 	     "register 0" is stored.  There are two tricks with this,
248f7cc78ecSespie 	     though.  One is that the rest of the registers might be
249f7cc78ecSespie 	     at positive or negative (or both) displacements from
250f7cc78ecSespie 	     *u_ar0.  The other is that u_ar0 is sometimes an absolute
251f7cc78ecSespie 	     address in kernel memory, and on other systems it is an
252f7cc78ecSespie 	     offset from the beginning of the `struct user'.
253f7cc78ecSespie 
254f7cc78ecSespie 	     As a practical matter, we don't know where the registers
255f7cc78ecSespie 	     actually are, so we have to pass the whole area to GDB.
256f7cc78ecSespie 	     We encode the value of u_ar0 by setting the .regs section
257f7cc78ecSespie 	     up so that its virtual memory address 0 is at the place
258f7cc78ecSespie 	     pointed to by u_ar0 (by setting the vma of the start of
259f7cc78ecSespie 	     the section to -u_ar0).  GDB uses this info to locate the
260f7cc78ecSespie 	     regs, using minor trickery to get around the
261f7cc78ecSespie 	     offset-or-absolute-addr problem.  */
262f7cc78ecSespie 
263f7cc78ecSespie 	  chead.cs_vaddr = 0 - (bfd_vma) u->u_ar0;
264f7cc78ecSespie 
265f7cc78ecSespie 	  secname = ".reg";
266f7cc78ecSespie 	  flags = SEC_HAS_CONTENTS;
267f7cc78ecSespie 
268f7cc78ecSespie 	  break;
269f7cc78ecSespie 	case CORES_PREGION:			/* A program region, map it */
270f7cc78ecSespie 	  switch (chead.cs_x.csx_preg.csxp_rtyp)
271f7cc78ecSespie 	    {
272f7cc78ecSespie 	    case PT_DATA:
273f7cc78ecSespie 	      secname = ".data";	/* Data region.		 */
274f7cc78ecSespie 	      break;
275f7cc78ecSespie 	    case PT_STACK:
276f7cc78ecSespie 	      secname = ".stack";	/* Stack region.	 */
277f7cc78ecSespie 	      break;
278f7cc78ecSespie 	    case PT_SHMEM:
279f7cc78ecSespie 	      secname = ".shmem";	/* Shared memory	 */
280f7cc78ecSespie 	      break;
281f7cc78ecSespie 	    case PT_LIBDAT:
282f7cc78ecSespie 	      secname = ".libdat";	/* Shared library data	 */
283f7cc78ecSespie 	      break;
284f7cc78ecSespie 	    case PT_V86:
285f7cc78ecSespie 	      secname = ".virt86";	/* Virtual 8086 mode	 */
286f7cc78ecSespie 	      break;
287f7cc78ecSespie 	    case PT_SHFIL:
288f7cc78ecSespie 	      secname = ".mmfile";	/* Memory mapped file	 */
289f7cc78ecSespie 	      break;
290f7cc78ecSespie 	    case PT_XDATA0:
291f7cc78ecSespie 	      secname = ".Xdat0";	/* XENIX data region, virtual 0 */
292f7cc78ecSespie 	      break;
293f7cc78ecSespie 	    default:
294f7cc78ecSespie 	      secname = "";
295f7cc78ecSespie 	    }
296f7cc78ecSespie 	  flags = SEC_ALLOC + SEC_LOAD + SEC_HAS_CONTENTS;
297f7cc78ecSespie 	  break;
298f7cc78ecSespie 	case CORES_PROC:			/* struct proc */
299f7cc78ecSespie 	case CORES_ITIMER:			/* interval timers */
300f7cc78ecSespie 	case CORES_SCOUTSNAME:			/* struct scoutsname */
301f7cc78ecSespie 	  secname = NULL;	/* Ignore these */
302f7cc78ecSespie 	  break;
303f7cc78ecSespie 	default:
304f7cc78ecSespie 	  (*_bfd_error_handler) ("Unhandled SCO core file section type %d\n",
305f7cc78ecSespie 				 chead.cs_stype);
306f7cc78ecSespie 	  continue;
307f7cc78ecSespie 	}
308f7cc78ecSespie 
309f7cc78ecSespie       if (secname
310f7cc78ecSespie 	  && !make_bfd_asection (abfd, secname, flags,
311f7cc78ecSespie 				 (bfd_size_type) chead.cs_vsize,
312f7cc78ecSespie 				 (bfd_vma) chead.cs_vaddr,
313f7cc78ecSespie 				 (file_ptr) chead.cs_sseek))
314d2201f2fSdrahn 	goto fail;
315f7cc78ecSespie 
316f7cc78ecSespie     }
317f7cc78ecSespie 
318f7cc78ecSespie   return abfd->xvec;
319f7cc78ecSespie 
320d2201f2fSdrahn  fail:
321d2201f2fSdrahn   if (abfd->tdata.any)
322d2201f2fSdrahn     {
323d2201f2fSdrahn       bfd_release (abfd, abfd->tdata.any);
324d2201f2fSdrahn       abfd->tdata.any = NULL;
325d2201f2fSdrahn     }
326d2201f2fSdrahn   bfd_section_list_clear (abfd);
327d2201f2fSdrahn   return NULL;
328f7cc78ecSespie }
329f7cc78ecSespie 
330f7cc78ecSespie char *
sco5_core_file_failing_command(abfd)331f7cc78ecSespie sco5_core_file_failing_command (abfd)
332f7cc78ecSespie      bfd *abfd;
333f7cc78ecSespie {
334f7cc78ecSespie   char *com = abfd->tdata.sco5_core_data->u.u_comm;
335f7cc78ecSespie   if (*com)
336f7cc78ecSespie     return com;
337f7cc78ecSespie   else
338f7cc78ecSespie     return NULL;
339f7cc78ecSespie }
340f7cc78ecSespie 
341f7cc78ecSespie int
sco5_core_file_failing_signal(ignore_abfd)342f7cc78ecSespie sco5_core_file_failing_signal (ignore_abfd)
343f7cc78ecSespie      bfd *ignore_abfd;
344f7cc78ecSespie {
345f7cc78ecSespie   return ((ignore_abfd->tdata.sco5_core_data->u.u_sysabort != 0)
346f7cc78ecSespie 	  ? ignore_abfd->tdata.sco5_core_data->u.u_sysabort
347f7cc78ecSespie 	  : -1);
348f7cc78ecSespie }
349f7cc78ecSespie 
350d2201f2fSdrahn bfd_boolean
sco5_core_file_matches_executable_p(core_bfd,exec_bfd)351f7cc78ecSespie sco5_core_file_matches_executable_p  (core_bfd, exec_bfd)
352d2201f2fSdrahn      bfd *core_bfd ATTRIBUTE_UNUSED;
353d2201f2fSdrahn      bfd *exec_bfd ATTRIBUTE_UNUSED;
354f7cc78ecSespie {
355d2201f2fSdrahn   return TRUE;		/* FIXME, We have no way of telling at this point */
356f7cc78ecSespie }
357f7cc78ecSespie 
358f7cc78ecSespie /* If somebody calls any byte-swapping routines, shoot them.  */
359f7cc78ecSespie static void
swap_abort()360f7cc78ecSespie swap_abort ()
361f7cc78ecSespie {
362f7cc78ecSespie   abort (); /* This way doesn't require any declaration for ANSI to fuck up */
363f7cc78ecSespie }
364*cf2f2c56Smiod 
365*cf2f2c56Smiod #define	NO_GET ((bfd_vma (*) (const void *)) swap_abort)
366*cf2f2c56Smiod #define	NO_PUT ((void (*) (bfd_vma, void *)) swap_abort)
367*cf2f2c56Smiod #define	NO_GETS ((bfd_signed_vma (*) (const void *)) swap_abort)
368*cf2f2c56Smiod #define	NO_GET64 ((bfd_uint64_t (*) (const void *)) swap_abort)
369*cf2f2c56Smiod #define	NO_PUT64 ((void (*) (bfd_uint64_t, void *)) swap_abort)
370*cf2f2c56Smiod #define	NO_GETS64 ((bfd_int64_t (*) (const void *)) swap_abort)
371f7cc78ecSespie 
372f7cc78ecSespie const bfd_target sco5_core_vec =
373f7cc78ecSespie   {
374f7cc78ecSespie     "sco5-core",
375f7cc78ecSespie     bfd_target_unknown_flavour,
376f7cc78ecSespie     BFD_ENDIAN_LITTLE,	       /* target byte order */
377f7cc78ecSespie     BFD_ENDIAN_LITTLE,	       /* target headers byte order */
378f7cc78ecSespie     (HAS_RELOC | EXEC_P |	/* object flags */
379f7cc78ecSespie      HAS_LINENO | HAS_DEBUG |
380f7cc78ecSespie      HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
381f7cc78ecSespie     (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
382f7cc78ecSespie     0,							   /* symbol prefix */
383f7cc78ecSespie     ' ',						   /* ar_pad_char */
384f7cc78ecSespie     16,							   /* ar_max_namelen */
385*cf2f2c56Smiod     NO_GET64, NO_GETS64, NO_PUT64,	/* 64 bit data */
386*cf2f2c56Smiod     NO_GET, NO_GETS, NO_PUT,		/* 32 bit data */
387*cf2f2c56Smiod     NO_GET, NO_GETS, NO_PUT,		/* 16 bit data */
388*cf2f2c56Smiod     NO_GET64, NO_GETS64, NO_PUT64,	/* 64 bit hdrs */
389*cf2f2c56Smiod     NO_GET, NO_GETS, NO_PUT,		/* 32 bit hdrs */
390*cf2f2c56Smiod     NO_GET, NO_GETS, NO_PUT,		/* 16 bit hdrs */
391f7cc78ecSespie 
392f7cc78ecSespie     {				/* bfd_check_format */
393f7cc78ecSespie       _bfd_dummy_target,		/* unknown format */
394f7cc78ecSespie       _bfd_dummy_target,		/* object file */
395f7cc78ecSespie       _bfd_dummy_target,		/* archive */
396f7cc78ecSespie       sco5_core_file_p			/* a core file */
397f7cc78ecSespie     },
398f7cc78ecSespie     {				/* bfd_set_format */
399f7cc78ecSespie       bfd_false, bfd_false,
400f7cc78ecSespie       bfd_false, bfd_false
401f7cc78ecSespie     },
402f7cc78ecSespie     {				/* bfd_write_contents */
403f7cc78ecSespie       bfd_false, bfd_false,
404f7cc78ecSespie       bfd_false, bfd_false
405f7cc78ecSespie     },
406f7cc78ecSespie 
407f7cc78ecSespie     BFD_JUMP_TABLE_GENERIC (_bfd_generic),
408f7cc78ecSespie     BFD_JUMP_TABLE_COPY (_bfd_generic),
409f7cc78ecSespie     BFD_JUMP_TABLE_CORE (sco5),
410f7cc78ecSespie     BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
411d2201f2fSdrahn     BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
412f7cc78ecSespie     BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
413f7cc78ecSespie     BFD_JUMP_TABLE_WRITE (_bfd_generic),
414f7cc78ecSespie     BFD_JUMP_TABLE_LINK (_bfd_nolink),
415f7cc78ecSespie     BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
416f7cc78ecSespie 
417f7cc78ecSespie     NULL,
418f7cc78ecSespie 
419f7cc78ecSespie     (PTR) 0			/* backend_data */
420f7cc78ecSespie   };
421