xref: /openbsd/gnu/usr.bin/binutils/bfd/cisco-core.c (revision c074d1c9)
12159047fSniklas /* BFD back-end for CISCO crash dumps.
2*c074d1c9Sdrahn    Copyright 1994, 1997, 1999, 2000, 2001, 2002
3*c074d1c9Sdrahn    Free Software Foundation, Inc.
42159047fSniklas 
52159047fSniklas This file is part of BFD, the Binary File Descriptor library.
62159047fSniklas 
72159047fSniklas This program is free software; you can redistribute it and/or modify
82159047fSniklas it under the terms of the GNU General Public License as published by
92159047fSniklas the Free Software Foundation; either version 2 of the License, or
102159047fSniklas (at your option) any later version.
112159047fSniklas 
122159047fSniklas This program is distributed in the hope that it will be useful,
132159047fSniklas but WITHOUT ANY WARRANTY; without even the implied warranty of
142159047fSniklas MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
152159047fSniklas GNU General Public License for more details.
162159047fSniklas 
172159047fSniklas You should have received a copy of the GNU General Public License
182159047fSniklas along with this program; if not, write to the Free Software
192159047fSniklas Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
202159047fSniklas 
212159047fSniklas #include "bfd.h"
222159047fSniklas #include "sysdep.h"
232159047fSniklas #include "libbfd.h"
242159047fSniklas /* core_file_failing_signal returns a host signal (this probably should
252159047fSniklas    be fixed).  */
262159047fSniklas #include <signal.h>
27b305b0f1Sespie 
28b305b0f1Sespie /* for MSVC builds */
29b305b0f1Sespie #ifndef SIGTRAP
30b305b0f1Sespie # define SIGTRAP 5
31b305b0f1Sespie #endif
32b305b0f1Sespie #ifndef SIGEMT
33b305b0f1Sespie # define SIGEMT 6
34b305b0f1Sespie #endif
35b305b0f1Sespie #ifndef SIGBUS
36b305b0f1Sespie # define SIGBUS 10
37b305b0f1Sespie #endif
382159047fSniklas 
39b305b0f1Sespie int crash_info_locs[] = {
40b305b0f1Sespie   0x0250,	/* mips, ppc, x86, i960 */
41b305b0f1Sespie   0x0400,	/* m68k, mips, x86, i960 */
42b305b0f1Sespie   0x0FFC,	/* m68k, mips, ppc, x86, i960 */
43b305b0f1Sespie   0x3000,	/* ppc */
44b305b0f1Sespie   0x4FFC,	/* m68k */
45b305b0f1Sespie   -1
46b305b0f1Sespie };
47b305b0f1Sespie 
482159047fSniklas #define CRASH_MAGIC	0xdead1234
49b305b0f1Sespie #define MASK_ADDR(x)	((x) & 0x0fffffff)	/* Mask crash info address */
502159047fSniklas 
512159047fSniklas typedef enum {
522159047fSniklas     CRASH_REASON_NOTCRASHED = 0,
532159047fSniklas     CRASH_REASON_EXCEPTION = 1,
542159047fSniklas     CRASH_REASON_CORRUPT = 2,
552159047fSniklas } crashreason;
562159047fSniklas 
57b305b0f1Sespie typedef struct {
582159047fSniklas   char magic[4];		/* Magic number */
592159047fSniklas   char version[4];		/* Version number */
602159047fSniklas   char reason[4];		/* Crash reason */
612159047fSniklas   char cpu_vector[4];		/* CPU vector for exceptions */
622159047fSniklas   char registers[4];		/* Pointer to saved registers */
632159047fSniklas   char rambase[4];		/* Base of RAM (not in V1 crash info) */
64b305b0f1Sespie   char textbase[4];		/* Base of .text section (not in V3 crash info) */
65b305b0f1Sespie   char database[4];		/* Base of .data section (not in V3 crash info) */
66b305b0f1Sespie   char bssbase[4];		/* Base of .bss section (not in V3 crash info) */
67b305b0f1Sespie } crashinfo_external;
68*c074d1c9Sdrahn 
692159047fSniklas struct cisco_core_struct
702159047fSniklas {
712159047fSniklas   int sig;
722159047fSniklas };
73*c074d1c9Sdrahn 
74*c074d1c9Sdrahn static const bfd_target *cisco_core_file_validate PARAMS ((bfd *, int));
75*c074d1c9Sdrahn static const bfd_target *cisco_core_file_p PARAMS ((bfd *));
76*c074d1c9Sdrahn char *cisco_core_file_failing_command PARAMS ((bfd *));
77*c074d1c9Sdrahn int cisco_core_file_failing_signal PARAMS ((bfd *));
78*c074d1c9Sdrahn bfd_boolean cisco_core_file_matches_executable_p PARAMS ((bfd *, bfd *));
792159047fSniklas 
80b305b0f1Sespie /* Examine the file for a crash info struct at the offset given by
81b305b0f1Sespie    CRASH_INFO_LOC.  */
82b305b0f1Sespie 
832159047fSniklas static const bfd_target *
cisco_core_file_validate(abfd,crash_info_loc)84b305b0f1Sespie cisco_core_file_validate (abfd, crash_info_loc)
852159047fSniklas      bfd *abfd;
86b305b0f1Sespie      int crash_info_loc;
872159047fSniklas {
882159047fSniklas   char buf[4];
892159047fSniklas   unsigned int crashinfo_offset;
90b305b0f1Sespie   crashinfo_external crashinfo;
912159047fSniklas   int nread;
92b305b0f1Sespie   unsigned int magic;
93b305b0f1Sespie   unsigned int version;
942159047fSniklas   unsigned int rambase;
952159047fSniklas   sec_ptr asect;
962159047fSniklas   struct stat statbuf;
97*c074d1c9Sdrahn   bfd_size_type amt;
982159047fSniklas 
99*c074d1c9Sdrahn   if (bfd_seek (abfd, (file_ptr) crash_info_loc, SEEK_SET) != 0)
1002159047fSniklas     return NULL;
1012159047fSniklas 
102*c074d1c9Sdrahn   nread = bfd_bread (buf, (bfd_size_type) 4, abfd);
1032159047fSniklas   if (nread != 4)
1042159047fSniklas     {
1052159047fSniklas       if (bfd_get_error () != bfd_error_system_call)
1062159047fSniklas 	bfd_set_error (bfd_error_wrong_format);
1072159047fSniklas       return NULL;
1082159047fSniklas     }
109b305b0f1Sespie   crashinfo_offset = MASK_ADDR (bfd_get_32 (abfd, buf));
1102159047fSniklas 
111*c074d1c9Sdrahn   if (bfd_seek (abfd, (file_ptr) crashinfo_offset, SEEK_SET) != 0)
112b305b0f1Sespie     {
113b305b0f1Sespie       /* Most likely we failed because of a bogus (huge) offset */
114b305b0f1Sespie       bfd_set_error (bfd_error_wrong_format);
1152159047fSniklas       return NULL;
116b305b0f1Sespie     }
1172159047fSniklas 
118*c074d1c9Sdrahn   nread = bfd_bread (&crashinfo, (bfd_size_type) sizeof (crashinfo), abfd);
1192159047fSniklas   if (nread != sizeof (crashinfo))
1202159047fSniklas     {
1212159047fSniklas       if (bfd_get_error () != bfd_error_system_call)
1222159047fSniklas 	bfd_set_error (bfd_error_wrong_format);
1232159047fSniklas       return NULL;
1242159047fSniklas     }
1252159047fSniklas 
1262159047fSniklas   if (bfd_stat (abfd, &statbuf) < 0)
1272159047fSniklas     {
1282159047fSniklas       bfd_set_error (bfd_error_system_call);
1292159047fSniklas       return NULL;
1302159047fSniklas     }
1312159047fSniklas 
132b305b0f1Sespie   magic = bfd_get_32 (abfd, crashinfo.magic);
133b305b0f1Sespie   if (magic != CRASH_MAGIC)
1342159047fSniklas     {
1352159047fSniklas       bfd_set_error (bfd_error_wrong_format);
1362159047fSniklas       return NULL;
1372159047fSniklas     }
1382159047fSniklas 
139b305b0f1Sespie   version = bfd_get_32 (abfd, crashinfo.version);
140b305b0f1Sespie   if (version == 0)
1412159047fSniklas     {
1422159047fSniklas       bfd_set_error (bfd_error_wrong_format);
1432159047fSniklas       return NULL;
144b305b0f1Sespie     }
145b305b0f1Sespie   else if (version == 1)
146b305b0f1Sespie     {
147b305b0f1Sespie       /* V1 core dumps don't specify the dump base, assume 0 */
1482159047fSniklas       rambase = 0;
149b305b0f1Sespie     }
150b305b0f1Sespie   else
151b305b0f1Sespie     {
1522159047fSniklas       rambase = bfd_get_32 (abfd, crashinfo.rambase);
1532159047fSniklas     }
1542159047fSniklas 
1552159047fSniklas   /* OK, we believe you.  You're a core file.  */
1562159047fSniklas 
157*c074d1c9Sdrahn   amt = sizeof (struct cisco_core_struct);
158*c074d1c9Sdrahn   abfd->tdata.cisco_core_data = (struct cisco_core_struct *) bfd_zmalloc (amt);
1592159047fSniklas   if (abfd->tdata.cisco_core_data == NULL)
1602159047fSniklas     return NULL;
1612159047fSniklas 
1622159047fSniklas   switch ((crashreason) bfd_get_32 (abfd, crashinfo.reason))
1632159047fSniklas     {
1642159047fSniklas     case CRASH_REASON_NOTCRASHED:
1652159047fSniklas       /* Crash file probably came from write core.  */
1662159047fSniklas       abfd->tdata.cisco_core_data->sig = 0;
1672159047fSniklas       break;
1682159047fSniklas     case CRASH_REASON_CORRUPT:
1692159047fSniklas       /* The crash context area was corrupt -- proceed with caution.
1702159047fSniklas 	 We have no way of passing this information back to the caller.  */
1712159047fSniklas       abfd->tdata.cisco_core_data->sig = 0;
1722159047fSniklas       break;
1732159047fSniklas     case CRASH_REASON_EXCEPTION:
1742159047fSniklas       /* Crash occured due to CPU exception.  */
1752159047fSniklas 
1762159047fSniklas       /* This is 68k-specific; for MIPS we'll need to interpret
1772159047fSniklas 	 cpu_vector differently based on the target configuration
1782159047fSniklas 	 (since CISCO core files don't seem to have the processor
1792159047fSniklas 	 encoded in them).  */
1802159047fSniklas 
1812159047fSniklas       switch (bfd_get_32 (abfd, crashinfo.cpu_vector))
1822159047fSniklas 	{
1832159047fSniklas 	   /* bus error           */
1842159047fSniklas 	case 2 : abfd->tdata.cisco_core_data->sig = SIGBUS; break;
1852159047fSniklas 	   /* address error       */
1862159047fSniklas 	case 3 : abfd->tdata.cisco_core_data->sig = SIGBUS; break;
1872159047fSniklas 	   /* illegal instruction */
1882159047fSniklas 	case 4 : abfd->tdata.cisco_core_data->sig = SIGILL;  break;
1892159047fSniklas 	   /* zero divide         */
1902159047fSniklas 	case 5 : abfd->tdata.cisco_core_data->sig = SIGFPE;  break;
1912159047fSniklas 	   /* chk instruction     */
1922159047fSniklas 	case 6 : abfd->tdata.cisco_core_data->sig = SIGFPE; break;
1932159047fSniklas 	   /* trapv instruction   */
1942159047fSniklas 	case 7 : abfd->tdata.cisco_core_data->sig = SIGFPE; break;
1952159047fSniklas 	   /* privilege violation */
1962159047fSniklas 	case 8 : abfd->tdata.cisco_core_data->sig = SIGSEGV; break;
1972159047fSniklas 	   /* trace trap          */
1982159047fSniklas 	case 9 : abfd->tdata.cisco_core_data->sig = SIGTRAP;  break;
1992159047fSniklas 	   /* line 1010 emulator  */
2002159047fSniklas 	case 10: abfd->tdata.cisco_core_data->sig = SIGILL;  break;
2012159047fSniklas 	   /* line 1111 emulator  */
2022159047fSniklas 	case 11: abfd->tdata.cisco_core_data->sig = SIGILL;  break;
2032159047fSniklas 
2042159047fSniklas 	  /* Coprocessor protocol violation.  Using a standard MMU or FPU
2052159047fSniklas 	     this cannot be triggered by software.  Call it a SIGBUS.  */
2062159047fSniklas 	case 13: abfd->tdata.cisco_core_data->sig = SIGBUS;  break;
2072159047fSniklas 
2082159047fSniklas 	  /* interrupt           */
2092159047fSniklas 	case 31: abfd->tdata.cisco_core_data->sig = SIGINT;  break;
2102159047fSniklas 	  /* breakpoint          */
2112159047fSniklas 	case 33: abfd->tdata.cisco_core_data->sig = SIGTRAP;  break;
2122159047fSniklas 
2132159047fSniklas 	  /* floating point err  */
2142159047fSniklas 	case 48: abfd->tdata.cisco_core_data->sig = SIGFPE;  break;
2152159047fSniklas 	  /* floating point err  */
2162159047fSniklas 	case 49: abfd->tdata.cisco_core_data->sig = SIGFPE;  break;
2172159047fSniklas 	  /* zero divide         */
2182159047fSniklas 	case 50: abfd->tdata.cisco_core_data->sig = SIGFPE;  break;
2192159047fSniklas 	  /* underflow           */
2202159047fSniklas 	case 51: abfd->tdata.cisco_core_data->sig = SIGFPE;  break;
2212159047fSniklas 	  /* operand error       */
2222159047fSniklas 	case 52: abfd->tdata.cisco_core_data->sig = SIGFPE;  break;
2232159047fSniklas 	   /* overflow            */
2242159047fSniklas 	case 53: abfd->tdata.cisco_core_data->sig = SIGFPE;  break;
2252159047fSniklas 	  /* NAN                 */
2262159047fSniklas 	case 54: abfd->tdata.cisco_core_data->sig = SIGFPE;  break;
2272159047fSniklas 	default:
2286a4c786fSespie #ifndef SIGEMT
2296a4c786fSespie #define SIGEMT SIGTRAP
2306a4c786fSespie #endif
2312159047fSniklas 	  /* "software generated"*/
2322159047fSniklas 	  abfd->tdata.cisco_core_data->sig = SIGEMT;
2332159047fSniklas 	}
2342159047fSniklas       break;
2352159047fSniklas     default:
2362159047fSniklas       /* Unknown crash reason.  */
2372159047fSniklas       abfd->tdata.cisco_core_data->sig = 0;
2382159047fSniklas       break;
2392159047fSniklas     }
2402159047fSniklas 
241*c074d1c9Sdrahn   /* Create a ".data" section that maps the entire file, which is
242*c074d1c9Sdrahn      essentially a dump of the target system's RAM.  */
243*c074d1c9Sdrahn 
244*c074d1c9Sdrahn   asect = bfd_make_section_anyway (abfd, ".data");
245*c074d1c9Sdrahn   if (asect == NULL)
246*c074d1c9Sdrahn     goto error_return;
247*c074d1c9Sdrahn   asect->flags = SEC_ALLOC | SEC_LOAD | SEC_HAS_CONTENTS;
248*c074d1c9Sdrahn   /* The size of memory is the size of the core file itself.  */
249*c074d1c9Sdrahn   asect->_raw_size = statbuf.st_size;
250*c074d1c9Sdrahn   asect->vma = rambase;
251*c074d1c9Sdrahn   asect->filepos = 0;
252*c074d1c9Sdrahn 
253*c074d1c9Sdrahn   /* Create a ".crash" section to allow access to the saved
254*c074d1c9Sdrahn      crash information.  */
255*c074d1c9Sdrahn 
256*c074d1c9Sdrahn   asect = bfd_make_section_anyway (abfd, ".crash");
257*c074d1c9Sdrahn   if (asect == NULL)
258*c074d1c9Sdrahn     goto error_return;
259*c074d1c9Sdrahn   asect->flags = SEC_HAS_CONTENTS;
260*c074d1c9Sdrahn   asect->vma = 0;
261*c074d1c9Sdrahn   asect->filepos = crashinfo_offset;
262*c074d1c9Sdrahn   asect->_raw_size = sizeof (crashinfo);
2632159047fSniklas 
264b305b0f1Sespie   /* Create a ".reg" section to allow access to the saved
265b305b0f1Sespie      registers.  */
266b305b0f1Sespie 
267*c074d1c9Sdrahn   asect = bfd_make_section_anyway (abfd, ".reg");
2682159047fSniklas   if (asect == NULL)
2692159047fSniklas     goto error_return;
2702159047fSniklas   asect->flags = SEC_HAS_CONTENTS;
2712159047fSniklas   asect->vma = 0;
2722159047fSniklas   asect->filepos = bfd_get_32 (abfd, crashinfo.registers) - rambase;
273b305b0f1Sespie   /* Since we don't know the exact size of the saved register info,
274b305b0f1Sespie      choose a register section size that is either the remaining part
275b305b0f1Sespie      of the file, or 1024, whichever is smaller.  */
276b305b0f1Sespie   nread = statbuf.st_size - asect->filepos;
277b305b0f1Sespie   asect->_raw_size = (nread < 1024) ? nread : 1024;
2782159047fSniklas 
2792159047fSniklas   return abfd->xvec;
2802159047fSniklas 
281b305b0f1Sespie   /* Get here if we have already started filling out the BFD
282b305b0f1Sespie      and there is an error of some kind.  */
283b305b0f1Sespie 
2842159047fSniklas  error_return:
285*c074d1c9Sdrahn   bfd_release (abfd, abfd->tdata.any);
286*c074d1c9Sdrahn   abfd->tdata.any = NULL;
287*c074d1c9Sdrahn   bfd_section_list_clear (abfd);
2882159047fSniklas   return NULL;
2892159047fSniklas }
2902159047fSniklas 
291b305b0f1Sespie static const bfd_target *
cisco_core_file_p(abfd)292b305b0f1Sespie cisco_core_file_p (abfd)
293b305b0f1Sespie      bfd *abfd;
294b305b0f1Sespie {
295b305b0f1Sespie   int *crash_info_locp;
296b305b0f1Sespie   const bfd_target *target = NULL;
297b305b0f1Sespie 
298b305b0f1Sespie   for (crash_info_locp = crash_info_locs;
299b305b0f1Sespie        *crash_info_locp != -1  &&  target == NULL;
300b305b0f1Sespie        crash_info_locp++)
301b305b0f1Sespie     {
302b305b0f1Sespie       target = cisco_core_file_validate (abfd, *crash_info_locp);
303b305b0f1Sespie     }
304b305b0f1Sespie   return (target);
305b305b0f1Sespie }
306b305b0f1Sespie 
3072159047fSniklas char *
cisco_core_file_failing_command(abfd)3082159047fSniklas cisco_core_file_failing_command (abfd)
309*c074d1c9Sdrahn      bfd *abfd ATTRIBUTE_UNUSED;
3102159047fSniklas {
3112159047fSniklas   return NULL;
3122159047fSniklas }
3132159047fSniklas 
3142159047fSniklas int
cisco_core_file_failing_signal(abfd)3152159047fSniklas cisco_core_file_failing_signal (abfd)
316*c074d1c9Sdrahn      bfd *abfd ATTRIBUTE_UNUSED;
3172159047fSniklas {
3182159047fSniklas   return abfd->tdata.cisco_core_data->sig;
3192159047fSniklas }
3202159047fSniklas 
321*c074d1c9Sdrahn bfd_boolean
cisco_core_file_matches_executable_p(core_bfd,exec_bfd)3222159047fSniklas cisco_core_file_matches_executable_p (core_bfd, exec_bfd)
323*c074d1c9Sdrahn      bfd *core_bfd ATTRIBUTE_UNUSED;
324*c074d1c9Sdrahn      bfd *exec_bfd ATTRIBUTE_UNUSED;
3252159047fSniklas {
326*c074d1c9Sdrahn   return TRUE;
3272159047fSniklas }
3282159047fSniklas 
329b305b0f1Sespie extern const bfd_target cisco_core_little_vec;
330b305b0f1Sespie 
331b305b0f1Sespie const bfd_target cisco_core_big_vec =
3322159047fSniklas   {
333b305b0f1Sespie     "cisco-ios-core-big",
3342159047fSniklas     bfd_target_unknown_flavour,
335c88b1d6cSniklas     BFD_ENDIAN_BIG,		/* target byte order */
336c88b1d6cSniklas     BFD_ENDIAN_BIG,		/* target headers byte order */
3372159047fSniklas     (HAS_RELOC | EXEC_P |	/* object flags */
3382159047fSniklas      HAS_LINENO | HAS_DEBUG |
3392159047fSniklas      HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
3402159047fSniklas     (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
3412159047fSniklas     0,			                                   /* symbol prefix */
3422159047fSniklas     ' ',						   /* ar_pad_char */
3432159047fSniklas     16,							   /* ar_max_namelen */
3442159047fSniklas     bfd_getb64, bfd_getb_signed_64, bfd_putb64,
3452159047fSniklas     bfd_getb32, bfd_getb_signed_32, bfd_putb32,
3462159047fSniklas     bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
3472159047fSniklas     bfd_getb64, bfd_getb_signed_64, bfd_putb64,
3482159047fSniklas     bfd_getb32, bfd_getb_signed_32, bfd_putb32,
3492159047fSniklas     bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
3502159047fSniklas 
3512159047fSniklas     {				/* bfd_check_format */
3522159047fSniklas      _bfd_dummy_target,		/* unknown format */
3532159047fSniklas      _bfd_dummy_target,		/* object file */
3542159047fSniklas      _bfd_dummy_target,		/* archive */
3552159047fSniklas      cisco_core_file_p	/* a core file */
3562159047fSniklas     },
3572159047fSniklas     {				/* bfd_set_format */
3582159047fSniklas      bfd_false, bfd_false,
3592159047fSniklas      bfd_false, bfd_false
3602159047fSniklas     },
3612159047fSniklas     {				/* bfd_write_contents */
3622159047fSniklas      bfd_false, bfd_false,
3632159047fSniklas      bfd_false, bfd_false
3642159047fSniklas     },
3652159047fSniklas 
3662159047fSniklas        BFD_JUMP_TABLE_GENERIC (_bfd_generic),
3672159047fSniklas        BFD_JUMP_TABLE_COPY (_bfd_generic),
3682159047fSniklas        BFD_JUMP_TABLE_CORE (cisco),
3692159047fSniklas        BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
3702159047fSniklas        BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
3712159047fSniklas        BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
3722159047fSniklas        BFD_JUMP_TABLE_WRITE (_bfd_generic),
3732159047fSniklas        BFD_JUMP_TABLE_LINK (_bfd_nolink),
3742159047fSniklas        BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
3752159047fSniklas 
376b305b0f1Sespie     & cisco_core_little_vec,
377b305b0f1Sespie 
378b305b0f1Sespie     (PTR) 0			/* backend_data */
379b305b0f1Sespie };
380b305b0f1Sespie 
381b305b0f1Sespie const bfd_target cisco_core_little_vec =
382b305b0f1Sespie   {
383b305b0f1Sespie     "cisco-ios-core-little",
384b305b0f1Sespie     bfd_target_unknown_flavour,
385b305b0f1Sespie     BFD_ENDIAN_LITTLE,		/* target byte order */
386b305b0f1Sespie     BFD_ENDIAN_LITTLE,		/* target headers byte order */
387b305b0f1Sespie     (HAS_RELOC | EXEC_P |	/* object flags */
388b305b0f1Sespie      HAS_LINENO | HAS_DEBUG |
389b305b0f1Sespie      HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
390b305b0f1Sespie     (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
391b305b0f1Sespie     0,			                                   /* symbol prefix */
392b305b0f1Sespie     ' ',						   /* ar_pad_char */
393b305b0f1Sespie     16,							   /* ar_max_namelen */
394b305b0f1Sespie     bfd_getl64, bfd_getl_signed_64, bfd_putl64,
395b305b0f1Sespie     bfd_getl32, bfd_getl_signed_32, bfd_putl32,
396b305b0f1Sespie     bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
397b305b0f1Sespie     bfd_getl64, bfd_getl_signed_64, bfd_putl64,
398b305b0f1Sespie     bfd_getl32, bfd_getl_signed_32, bfd_putl32,
399b305b0f1Sespie     bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* hdrs */
400b305b0f1Sespie 
401b305b0f1Sespie     {				/* bfd_check_format */
402b305b0f1Sespie      _bfd_dummy_target,		/* unknown format */
403b305b0f1Sespie      _bfd_dummy_target,		/* object file */
404b305b0f1Sespie      _bfd_dummy_target,		/* archive */
405b305b0f1Sespie      cisco_core_file_p	/* a core file */
406b305b0f1Sespie     },
407b305b0f1Sespie     {				/* bfd_set_format */
408b305b0f1Sespie      bfd_false, bfd_false,
409b305b0f1Sespie      bfd_false, bfd_false
410b305b0f1Sespie     },
411b305b0f1Sespie     {				/* bfd_write_contents */
412b305b0f1Sespie      bfd_false, bfd_false,
413b305b0f1Sespie      bfd_false, bfd_false
414b305b0f1Sespie     },
415b305b0f1Sespie 
416b305b0f1Sespie        BFD_JUMP_TABLE_GENERIC (_bfd_generic),
417b305b0f1Sespie        BFD_JUMP_TABLE_COPY (_bfd_generic),
418b305b0f1Sespie        BFD_JUMP_TABLE_CORE (cisco),
419b305b0f1Sespie        BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
420b305b0f1Sespie        BFD_JUMP_TABLE_SYMBOLS (_bfd_nosymbols),
421b305b0f1Sespie        BFD_JUMP_TABLE_RELOCS (_bfd_norelocs),
422b305b0f1Sespie        BFD_JUMP_TABLE_WRITE (_bfd_generic),
423b305b0f1Sespie        BFD_JUMP_TABLE_LINK (_bfd_nolink),
424b305b0f1Sespie        BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
425b305b0f1Sespie 
426b305b0f1Sespie     &cisco_core_big_vec,
427b305b0f1Sespie 
4282159047fSniklas     (PTR) 0			/* backend_data */
4292159047fSniklas };
430