* elfxx-ia64.c (is_unwind_section_name): New function. Returns
[binutils.git] / bfd / versados.c
blob28c3dd27ef8f9f7bd4b44985c43e471c567364ff
1 /* BFD back-end for VERSAdos-E objects.
2 Copyright 1995, 96, 97, 98, 99, 2000 Free Software Foundation, Inc.
3 Written by Steve Chamberlain of Cygnus Support <sac@cygnus.com>.
5 Versados is a Motorola trademark.
7 This file is part of BFD, the Binary File Descriptor library.
9 This program is free software; you can redistribute it and/or modify
10 it under the terms of the GNU General Public License as published by
11 the Free Software Foundation; either version 2 of the License, or
12 (at your option) any later version.
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License for more details.
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
24 SUBSECTION
25 VERSAdos-E relocateable object file format
27 DESCRIPTION
29 This module supports reading of VERSAdos relocateable
30 object files.
32 A VERSAdos file looks like contains
34 o Indentification Record
35 o External Symbol Definition Record
36 o Object Text Recrod
37 o End Record
41 #include "bfd.h"
42 #include "sysdep.h"
43 #include "libbfd.h"
44 #include "libiberty.h"
46 static boolean versados_mkobject PARAMS ((bfd *));
47 static boolean versados_scan PARAMS ((bfd *));
48 static const bfd_target *versados_object_p PARAMS ((bfd *));
50 #define VHEADER '1'
51 #define VESTDEF '2'
52 #define VOTR '3'
53 #define VEND '4'
55 #define ES_BASE 17 /* first symbol has esdid 17 */
57 /* Per file target dependent information */
59 /* one for each section */
60 struct esdid
62 asection *section; /* ptr to bfd version */
63 unsigned char *contents; /* used to build image */
64 int pc;
65 int relocs; /* reloc count, valid end of pass 1 */
66 int donerel; /* have relocs been translated */
69 typedef struct versados_data_struct
71 int es_done; /* count of symbol index, starts at ES_BASE */
72 asymbol *symbols; /* pointer to local symbols */
73 char *strings; /* strings of all the above */
74 int stringlen; /* len of string table (valid end of pass1) */
75 int nsecsyms; /* number of sections */
77 int ndefs; /* number of exported symbols (they dont get esdids) */
78 int nrefs; /* number of imported symbols (valid end of pass1) */
80 int ref_idx; /* current processed value of the above */
81 int def_idx;
83 int pass_2_done;
85 struct esdid e[16]; /* per section info */
86 int alert; /* to see if we're trampling */
87 asymbol *rest[256 - 16]; /* per symbol info */
90 tdata_type;
92 #define VDATA(abfd) (abfd->tdata.versados_data)
93 #define EDATA(abfd, n) (abfd->tdata.versados_data->e[n])
94 #define RDATA(abfd, n) (abfd->tdata.versados_data->rest[n])
96 struct ext_otr
98 unsigned char size;
99 char type;
100 unsigned char map[4];
101 unsigned char esdid;
102 unsigned char data[200];
105 struct ext_vheader
107 unsigned char size;
108 char type; /* record type */
109 char name[10]; /* module name */
110 char rev; /* module rev number */
111 char lang;
112 char vol[4];
113 char user[2];
114 char cat[8];
115 char fname[8];
116 char ext[2];
117 char time[3];
118 char date[3];
119 char rest[211];
122 struct ext_esd
124 unsigned char size;
125 char type;
126 unsigned char esd_entries[1];
128 #define ESD_ABS 0
129 #define ESD_COMMON 1
130 #define ESD_STD_REL_SEC 2
131 #define ESD_SHRT_REL_SEC 3
132 #define ESD_XDEF_IN_SEC 4
133 #define ESD_XREF_SYM 7
134 #define ESD_XREF_SEC 6
135 #define ESD_XDEF_IN_ABS 5
136 union ext_any
138 unsigned char size;
139 struct ext_vheader header;
140 struct ext_esd esd;
141 struct ext_otr otr;
144 /* Initialize by filling in the hex conversion array. */
146 /* Set up the tdata information. */
148 static boolean
149 versados_mkobject (abfd)
150 bfd *abfd;
152 if (abfd->tdata.versados_data == NULL)
154 tdata_type *tdata = (tdata_type *) bfd_alloc (abfd, sizeof (tdata_type));
155 if (tdata == NULL)
156 return false;
157 abfd->tdata.versados_data = tdata;
158 tdata->symbols = NULL;
159 VDATA (abfd)->alert = 0x12345678;
162 bfd_default_set_arch_mach (abfd, bfd_arch_m68k, 0);
163 return true;
166 /* Report a problem in an S record file. FIXME: This probably should
167 not call fprintf, but we really do need some mechanism for printing
168 error messages. */
170 static asymbol *
171 versados_new_symbol (abfd, snum, name, val, sec)
172 bfd *abfd;
173 int snum;
174 const char *name;
175 bfd_vma val;
176 asection *sec;
178 asymbol *n = VDATA (abfd)->symbols + snum;
179 n->name = name;
180 n->value = val;
181 n->section = sec;
182 n->the_bfd = abfd;
183 n->flags = 0;
184 return n;
187 static int
188 get_record (abfd, ptr)
189 bfd *abfd;
190 union ext_any *ptr;
192 bfd_read (&ptr->size, 1, 1, abfd);
193 if (bfd_read ((char *) ptr + 1, 1, ptr->size, abfd) != ptr->size)
194 return 0;
195 return 1;
199 get_4 (pp)
200 unsigned char **pp;
202 unsigned char *p = *pp;
203 *pp += 4;
204 return (p[0] << 24) | (p[1] << 16) | (p[2] << 8) | (p[3] << 0);
207 void
208 get_10 (pp, name)
209 unsigned char **pp;
210 char *name;
212 char *p = (char *) *pp;
213 int len = 10;
214 *pp += len;
215 while (*p != ' '
216 && len)
218 *name++ = *p++;
219 len--;
221 *name = 0;
224 static char *
225 new_symbol_string (abfd, name)
226 bfd *abfd;
227 char *name;
229 char *n = VDATA (abfd)->strings;
230 strcpy (VDATA (abfd)->strings, name);
231 VDATA (abfd)->strings += strlen (VDATA (abfd)->strings) + 1;
232 return n;
235 static void
236 process_esd (abfd, esd, pass)
237 bfd *abfd;
238 struct ext_esd *esd;
239 int pass;
241 /* Read through the ext def for the est entries */
242 int togo = esd->size - 2;
243 bfd_vma size;
244 bfd_vma start;
245 asection *sec;
246 char name[11];
247 unsigned char *ptr = esd->esd_entries;
248 unsigned char *end = ptr + togo;
249 while (ptr < end)
251 int scn = *ptr & 0xf;
252 int typ = (*ptr >> 4) & 0xf;
254 /* Declare this section */
255 sprintf (name, "%d", scn);
256 sec = bfd_make_section_old_way (abfd, strdup (name));
257 sec->target_index = scn;
258 EDATA (abfd, scn).section = sec;
259 ptr++;
260 switch (typ)
262 default:
263 abort ();
264 case ESD_XREF_SEC:
265 case ESD_XREF_SYM:
267 int snum = VDATA (abfd)->ref_idx++;
268 get_10 (&ptr, name);
269 if (pass == 1)
271 VDATA (abfd)->stringlen += strlen (name) + 1;
273 else
275 int esidx;
276 asymbol *s;
277 char *n = new_symbol_string (abfd, name);
278 s = versados_new_symbol (abfd, snum, n, 0,
279 &bfd_und_section, scn);
280 esidx = VDATA (abfd)->es_done++;
281 RDATA (abfd, esidx - ES_BASE) = s;
284 break;
286 case ESD_ABS:
287 size = get_4 (&ptr);
288 start = get_4 (&ptr);
289 break;
290 case ESD_STD_REL_SEC:
291 case ESD_SHRT_REL_SEC:
293 sec->_raw_size = get_4 (&ptr);
294 sec->flags |= SEC_ALLOC;
296 break;
297 case ESD_XDEF_IN_ABS:
298 sec = (asection *) & bfd_abs_section;
299 case ESD_XDEF_IN_SEC:
301 int snum = VDATA (abfd)->def_idx++;
302 long val;
303 get_10 (&ptr, name);
304 val = get_4 (&ptr);
305 if (pass == 1)
307 /* Just remember the symbol */
308 VDATA (abfd)->stringlen += strlen (name) + 1;
310 else
312 asymbol *s;
313 char *n = new_symbol_string (abfd, name);
314 s = versados_new_symbol (abfd, snum + VDATA (abfd)->nrefs, n, val, sec, scn);
315 s->flags |= BSF_GLOBAL;
318 break;
323 #define R_RELWORD 1
324 #define R_RELLONG 2
325 #define R_RELWORD_NEG 3
326 #define R_RELLONG_NEG 4
328 reloc_howto_type versados_howto_table[] =
330 HOWTO (R_RELWORD, 0, 1, 16, false,
331 0, complain_overflow_dont, 0,
332 "+v16", true, 0x0000ffff, 0x0000ffff, false),
333 HOWTO (R_RELLONG, 0, 2, 32, false,
334 0, complain_overflow_dont, 0,
335 "+v32", true, 0xffffffff, 0xffffffff, false),
337 HOWTO (R_RELWORD_NEG, 0, -1, 16, false,
338 0, complain_overflow_dont, 0,
339 "-v16", true, 0x0000ffff, 0x0000ffff, false),
340 HOWTO (R_RELLONG_NEG, 0, -2, 32, false,
341 0, complain_overflow_dont, 0,
342 "-v32", true, 0xffffffff, 0xffffffff, false),
345 static int
346 get_offset (len, ptr)
347 int len;
348 unsigned char *ptr;
350 int val = 0;
351 if (len)
353 int i;
354 val = *ptr++;
355 if (val & 0x80)
356 val |= ~0xff;
357 for (i = 1; i < len; i++)
358 val = (val << 8) | *ptr++;
361 return val;
364 static void
365 process_otr (abfd, otr, pass)
366 bfd *abfd;
367 struct ext_otr *otr;
368 int pass;
370 unsigned long shift;
371 unsigned char *srcp = otr->data;
372 unsigned char *endp = (unsigned char *) otr + otr->size;
373 unsigned int bits = (otr->map[0] << 24)
374 | (otr->map[1] << 16)
375 | (otr->map[2] << 8)
376 | (otr->map[3] << 0);
378 struct esdid *esdid = &EDATA (abfd, otr->esdid - 1);
379 unsigned char *contents = esdid->contents;
380 int need_contents = 0;
381 unsigned int dst_idx = esdid->pc;
383 for (shift = (1 << 31); shift && srcp < endp; shift >>= 1)
385 if (bits & shift)
387 int flag = *srcp++;
388 int esdids = (flag >> 5) & 0x7;
389 int sizeinwords = ((flag >> 3) & 1) ? 2 : 1;
390 int offsetlen = flag & 0x7;
391 int j;
393 if (esdids == 0)
395 /* A zero esdid means the new pc is the offset given */
396 dst_idx += get_offset (offsetlen, srcp);
397 srcp += offsetlen;
399 else
401 int val = get_offset (offsetlen, srcp + esdids);
402 if (pass == 1)
403 need_contents = 1;
404 else
405 for (j = 0; j < sizeinwords * 2; j++)
407 contents[dst_idx + (sizeinwords * 2) - j - 1] = val;
408 val >>= 8;
411 for (j = 0; j < esdids; j++)
413 int esdid = *srcp++;
415 if (esdid)
417 int rn = EDATA (abfd, otr->esdid - 1).relocs++;
418 if (pass == 1)
420 /* this is the first pass over the data,
421 just remember that we need a reloc */
423 else
425 arelent *n =
426 EDATA (abfd, otr->esdid - 1).section->relocation + rn;
427 n->address = dst_idx;
429 n->sym_ptr_ptr = (asymbol **) esdid;
430 n->addend = 0;
431 n->howto = versados_howto_table + ((j & 1) * 2) + (sizeinwords - 1);
435 srcp += offsetlen;
436 dst_idx += sizeinwords * 2;
439 else
441 need_contents = 1;
442 if (dst_idx < esdid->section->_raw_size)
443 if (pass == 2)
445 /* absolute code, comes in 16 bit lumps */
446 contents[dst_idx] = srcp[0];
447 contents[dst_idx + 1] = srcp[1];
449 dst_idx += 2;
450 srcp += 2;
453 EDATA (abfd, otr->esdid - 1).pc = dst_idx;
455 if (!contents && need_contents)
456 esdid->contents = (unsigned char *) bfd_alloc (abfd, esdid->section->_raw_size);
460 static boolean
461 versados_scan (abfd)
462 bfd *abfd;
464 int loop = 1;
465 int i;
466 int j;
467 int nsecs = 0;
469 VDATA (abfd)->stringlen = 0;
470 VDATA (abfd)->nrefs = 0;
471 VDATA (abfd)->ndefs = 0;
472 VDATA (abfd)->ref_idx = 0;
473 VDATA (abfd)->def_idx = 0;
474 VDATA (abfd)->pass_2_done = 0;
476 while (loop)
478 union ext_any any;
479 if (!get_record (abfd, &any))
480 return true;
481 switch (any.header.type)
483 case VHEADER:
484 break;
485 case VEND:
486 loop = 0;
487 break;
488 case VESTDEF:
489 process_esd (abfd, &any.esd, 1);
490 break;
491 case VOTR:
492 process_otr (abfd, &any.otr, 1);
493 break;
497 /* Now allocate space for the relocs and sections */
499 VDATA (abfd)->nrefs = VDATA (abfd)->ref_idx;
500 VDATA (abfd)->ndefs = VDATA (abfd)->def_idx;
501 VDATA (abfd)->ref_idx = 0;
502 VDATA (abfd)->def_idx = 0;
504 abfd->symcount = VDATA (abfd)->nrefs + VDATA (abfd)->ndefs;
506 for (i = 0; i < 16; i++)
508 struct esdid *esdid = &EDATA (abfd, i);
509 if (esdid->section)
511 esdid->section->relocation
512 = (arelent *) bfd_alloc (abfd, sizeof (arelent) * esdid->relocs);
514 esdid->pc = 0;
516 if (esdid->contents)
517 esdid->section->flags |= SEC_HAS_CONTENTS | SEC_LOAD;
519 esdid->section->reloc_count = esdid->relocs;
520 if (esdid->relocs)
521 esdid->section->flags |= SEC_RELOC;
523 esdid->relocs = 0;
525 /* Add an entry into the symbol table for it */
526 nsecs++;
527 VDATA (abfd)->stringlen += strlen (esdid->section->name) + 1;
531 abfd->symcount += nsecs;
533 VDATA (abfd)->symbols = (asymbol *) bfd_alloc (abfd,
534 sizeof (asymbol) * (abfd->symcount));
536 VDATA (abfd)->strings = bfd_alloc (abfd, VDATA (abfd)->stringlen);
538 if ((VDATA (abfd)->symbols == NULL && abfd->symcount > 0)
539 || (VDATA (abfd)->strings == NULL && VDATA (abfd)->stringlen > 0))
540 return false;
542 /* Actually fill in the section symbols,
543 we stick them at the end of the table */
545 for (j = VDATA (abfd)->nrefs + VDATA (abfd)->ndefs, i = 0; i < 16; i++)
547 struct esdid *esdid = &EDATA (abfd, i);
548 asection *sec = esdid->section;
549 if (sec)
551 asymbol *s = VDATA (abfd)->symbols + j;
552 s->name = new_symbol_string (abfd, sec->name);
553 s->section = sec;
554 s->flags = BSF_LOCAL;
555 s->value = 0;
556 s->the_bfd = abfd;
557 j++;
560 if (abfd->symcount)
561 abfd->flags |= HAS_SYMS;
563 /* Set this to nsecs - since we've already planted the section
564 symbols */
565 VDATA (abfd)->nsecsyms = nsecs;
567 VDATA (abfd)->ref_idx = 0;
569 return 1;
572 /* Check whether an existing file is a versados file. */
574 static const bfd_target *
575 versados_object_p (abfd)
576 bfd *abfd;
578 struct ext_vheader ext;
579 unsigned char len;
581 if (bfd_seek (abfd, (file_ptr) 0, SEEK_SET) != 0)
582 return NULL;
584 if (bfd_read (&len, 1, 1, abfd) != 1)
586 if (bfd_get_error () != bfd_error_system_call)
587 bfd_set_error (bfd_error_wrong_format);
588 return NULL;
591 if (bfd_read (&ext.type, 1, len, abfd) != len)
593 if (bfd_get_error () != bfd_error_system_call)
594 bfd_set_error (bfd_error_wrong_format);
595 return NULL;
598 /* We guess that the language field will never be larger than 10.
599 In sample files, it is always either 0 or 1. Checking for this
600 prevents confusion with Intel Hex files. */
601 if (ext.type != VHEADER
602 || ext.lang > 10)
604 bfd_set_error (bfd_error_wrong_format);
605 return NULL;
608 /* OK, looks like a record, build the tdata and read in. */
610 if (!versados_mkobject (abfd)
611 || !versados_scan (abfd))
612 return NULL;
614 return abfd->xvec;
617 static boolean
618 versados_pass_2 (abfd)
619 bfd *abfd;
621 union ext_any any;
623 if (VDATA (abfd)->pass_2_done)
624 return 1;
626 if (bfd_seek (abfd, 0, SEEK_SET) != 0)
627 return 0;
629 VDATA (abfd)->es_done = ES_BASE;
631 /* read records till we get to where we want to be */
633 while (1)
635 get_record (abfd, &any);
636 switch (any.header.type)
638 case VEND:
639 VDATA (abfd)->pass_2_done = 1;
640 return 1;
641 case VESTDEF:
642 process_esd (abfd, &any.esd, 2);
643 break;
644 case VOTR:
645 process_otr (abfd, &any.otr, 2);
646 break;
651 static boolean
652 versados_get_section_contents (abfd, section, location, offset, count)
653 bfd *abfd;
654 asection *section;
655 PTR location;
656 file_ptr offset;
657 bfd_size_type count;
659 if (!versados_pass_2 (abfd))
660 return false;
662 memcpy (location,
663 EDATA (abfd, section->target_index).contents + offset,
664 (size_t) count);
666 return true;
669 #define versados_get_section_contents_in_window \
670 _bfd_generic_get_section_contents_in_window
672 static boolean
673 versados_set_section_contents (abfd, section, location, offset, bytes_to_do)
674 bfd *abfd ATTRIBUTE_UNUSED;
675 sec_ptr section ATTRIBUTE_UNUSED;
676 PTR location ATTRIBUTE_UNUSED;
677 file_ptr offset ATTRIBUTE_UNUSED;
678 bfd_size_type bytes_to_do ATTRIBUTE_UNUSED;
680 return false;
683 static int
684 versados_sizeof_headers (abfd, exec)
685 bfd *abfd ATTRIBUTE_UNUSED;
686 boolean exec ATTRIBUTE_UNUSED;
688 return 0;
691 static asymbol *
692 versados_make_empty_symbol (abfd)
693 bfd *abfd;
695 asymbol *new = (asymbol *) bfd_zalloc (abfd, sizeof (asymbol));
696 if (new)
697 new->the_bfd = abfd;
698 return new;
701 /* Return the amount of memory needed to read the symbol table. */
703 static long
704 versados_get_symtab_upper_bound (abfd)
705 bfd *abfd;
707 return (bfd_get_symcount (abfd) + 1) * sizeof (asymbol *);
710 /* Return the symbol table. */
712 static long
713 versados_get_symtab (abfd, alocation)
714 bfd *abfd;
715 asymbol **alocation;
717 unsigned int symcount = bfd_get_symcount (abfd);
718 unsigned int i;
719 asymbol *s;
721 versados_pass_2 (abfd);
723 for (i = 0, s = VDATA (abfd)->symbols;
724 i < symcount;
725 s++, i++)
727 *alocation++ = s;
730 *alocation = NULL;
732 return symcount;
735 void
736 versados_get_symbol_info (ignore_abfd, symbol, ret)
737 bfd *ignore_abfd ATTRIBUTE_UNUSED;
738 asymbol *symbol;
739 symbol_info *ret;
741 bfd_symbol_info (symbol, ret);
744 void
745 versados_print_symbol (ignore_abfd, afile, symbol, how)
746 bfd *ignore_abfd ATTRIBUTE_UNUSED;
747 PTR afile;
748 asymbol *symbol;
749 bfd_print_symbol_type how;
751 FILE *file = (FILE *) afile;
752 switch (how)
754 case bfd_print_symbol_name:
755 fprintf (file, "%s", symbol->name);
756 break;
757 default:
758 bfd_print_symbol_vandf ((PTR) file, symbol);
759 fprintf (file, " %-5s %s",
760 symbol->section->name,
761 symbol->name);
766 long
767 versados_get_reloc_upper_bound (abfd, asect)
768 bfd *abfd ATTRIBUTE_UNUSED;
769 sec_ptr asect;
771 return (asect->reloc_count + 1) * sizeof (arelent *);
774 long
775 versados_canonicalize_reloc (abfd, section, relptr, symbols)
776 bfd *abfd;
777 sec_ptr section;
778 arelent **relptr;
779 asymbol **symbols;
781 unsigned int count;
782 arelent *src;
784 versados_pass_2 (abfd);
785 src = section->relocation;
786 if (!EDATA (abfd, section->target_index).donerel)
788 EDATA (abfd, section->target_index).donerel = 1;
789 /* translate from indexes to symptr ptrs */
790 for (count = 0; count < section->reloc_count; count++)
792 int esdid = (int) src[count].sym_ptr_ptr;
794 if (esdid == 0)
796 src[count].sym_ptr_ptr = bfd_abs_section.symbol_ptr_ptr;
798 else if (esdid < ES_BASE) /* Section relative thing */
800 struct esdid *e = &EDATA (abfd, esdid - 1);
801 if (!section)
803 /** relocation relative to section which was
804 never declared ! */
806 src[count].sym_ptr_ptr = e->section->symbol_ptr_ptr;
808 else
810 src[count].sym_ptr_ptr = symbols + esdid - ES_BASE;
816 for (count = 0; count < section->reloc_count; count++)
818 *relptr++ = src++;
820 *relptr = 0;
821 return section->reloc_count;
824 #define versados_close_and_cleanup _bfd_generic_close_and_cleanup
825 #define versados_bfd_free_cached_info _bfd_generic_bfd_free_cached_info
826 #define versados_new_section_hook _bfd_generic_new_section_hook
828 #define versados_bfd_is_local_label_name bfd_generic_is_local_label_name
829 #define versados_get_lineno _bfd_nosymbols_get_lineno
830 #define versados_find_nearest_line _bfd_nosymbols_find_nearest_line
831 #define versados_bfd_make_debug_symbol _bfd_nosymbols_bfd_make_debug_symbol
832 #define versados_read_minisymbols _bfd_generic_read_minisymbols
833 #define versados_minisymbol_to_symbol _bfd_generic_minisymbol_to_symbol
835 #define versados_bfd_reloc_type_lookup _bfd_norelocs_bfd_reloc_type_lookup
837 #define versados_set_arch_mach bfd_default_set_arch_mach
839 #define versados_bfd_get_relocated_section_contents \
840 bfd_generic_get_relocated_section_contents
841 #define versados_bfd_relax_section bfd_generic_relax_section
842 #define versados_bfd_gc_sections bfd_generic_gc_sections
843 #define versados_bfd_link_hash_table_create _bfd_generic_link_hash_table_create
844 #define versados_bfd_link_add_symbols _bfd_generic_link_add_symbols
845 #define versados_bfd_final_link _bfd_generic_final_link
846 #define versados_bfd_link_split_section _bfd_generic_link_split_section
848 const bfd_target versados_vec =
850 "versados", /* name */
851 bfd_target_versados_flavour,
852 BFD_ENDIAN_BIG, /* target byte order */
853 BFD_ENDIAN_BIG, /* target headers byte order */
854 (HAS_RELOC | EXEC_P | /* object flags */
855 HAS_LINENO | HAS_DEBUG |
856 HAS_SYMS | HAS_LOCALS | WP_TEXT | D_PAGED),
857 (SEC_CODE | SEC_DATA | SEC_ROM | SEC_HAS_CONTENTS
858 | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
859 0, /* leading underscore */
860 ' ', /* ar_pad_char */
861 16, /* ar_max_namelen */
862 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
863 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
864 bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* data */
865 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
866 bfd_getb32, bfd_getb_signed_32, bfd_putb32,
867 bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
870 _bfd_dummy_target,
871 versados_object_p, /* bfd_check_format */
872 _bfd_dummy_target,
873 _bfd_dummy_target,
876 bfd_false,
877 versados_mkobject,
878 _bfd_generic_mkarchive,
879 bfd_false,
881 { /* bfd_write_contents */
882 bfd_false,
883 bfd_false,
884 _bfd_write_archive_contents,
885 bfd_false,
888 BFD_JUMP_TABLE_GENERIC (versados),
889 BFD_JUMP_TABLE_COPY (_bfd_generic),
890 BFD_JUMP_TABLE_CORE (_bfd_nocore),
891 BFD_JUMP_TABLE_ARCHIVE (_bfd_noarchive),
892 BFD_JUMP_TABLE_SYMBOLS (versados),
893 BFD_JUMP_TABLE_RELOCS (versados),
894 BFD_JUMP_TABLE_WRITE (versados),
895 BFD_JUMP_TABLE_LINK (versados),
896 BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
898 NULL,
900 (PTR) 0