Back to index

cell-binutils  2.17cvs20070401
coff-i960.c
Go to the documentation of this file.
00001 /* BFD back-end for Intel 960 COFF files.
00002    Copyright 1990, 1991, 1992, 1993, 1994, 1995, 1997, 1999, 2000, 2001,
00003    2002, 2003, 2004, 2007 Free Software Foundation, Inc.
00004    Written by Cygnus Support.
00005 
00006 This file is part of BFD, the Binary File Descriptor library.
00007 
00008 This program is free software; you can redistribute it and/or modify
00009 it under the terms of the GNU General Public License as published by
00010 the Free Software Foundation; either version 2 of the License, or
00011 (at your option) any later version.
00012 
00013 This program is distributed in the hope that it will be useful,
00014 but WITHOUT ANY WARRANTY; without even the implied warranty of
00015 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00016 GNU General Public License for more details.
00017 
00018 You should have received a copy of the GNU General Public License
00019 along with this program; if not, write to the Free Software
00020 Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA.  */
00021 
00022 #define I960 1
00023 #define BADMAG(x) I960BADMAG(x)
00024 
00025 #include "bfd.h"
00026 #include "sysdep.h"
00027 #include "libbfd.h"
00028 #include "coff/i960.h"
00029 #include "coff/internal.h"
00030 #include "libcoff.h"        /* to allow easier abstraction-breaking */
00031 
00032 static bfd_boolean coff_i960_is_local_label_name
00033   PARAMS ((bfd *, const char *));
00034 static bfd_reloc_status_type optcall_callback
00035   PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
00036 static bfd_reloc_status_type coff_i960_relocate
00037   PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
00038 static reloc_howto_type *coff_i960_reloc_type_lookup
00039   PARAMS ((bfd *, bfd_reloc_code_real_type));
00040 static bfd_boolean coff_i960_start_final_link
00041   PARAMS ((bfd *, struct bfd_link_info *));
00042 static bfd_boolean coff_i960_relocate_section
00043   PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
00044           struct internal_reloc *, struct internal_syment *, asection **));
00045 static bfd_boolean coff_i960_adjust_symndx
00046   PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *,
00047           struct internal_reloc *, bfd_boolean *));
00048 
00049 #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER (3)
00050 #define COFF_ALIGN_IN_SECTION_HEADER 1
00051 
00052 #define GET_SCNHDR_ALIGN H_GET_32
00053 #define PUT_SCNHDR_ALIGN H_PUT_32
00054 
00055 /* The i960 does not support an MMU, so COFF_PAGE_SIZE can be
00056    arbitrarily small.  */
00057 #define COFF_PAGE_SIZE 1
00058 
00059 #define COFF_LONG_FILENAMES
00060 
00061 /* This set of local label names is taken from gas.  */
00062 
00063 static bfd_boolean
00064 coff_i960_is_local_label_name (abfd, name)
00065      bfd *abfd ATTRIBUTE_UNUSED;
00066      const char *name;
00067 {
00068   return (name[0] == 'L'
00069          || (name[0] == '.'
00070              && (name[1] == 'C'
00071                 || name[1] == 'I'
00072                 || name[1] == '.')));
00073 }
00074 
00075 /* This is just like the usual CALC_ADDEND, but it includes the
00076    section VMA for PC relative relocs.  */
00077 #ifndef CALC_ADDEND
00078 #define CALC_ADDEND(abfd, ptr, reloc, cache_ptr)                \
00079   {                                                             \
00080     coff_symbol_type *coffsym = (coff_symbol_type *) NULL;      \
00081     if (ptr && bfd_asymbol_bfd (ptr) != abfd)                   \
00082       coffsym = (obj_symbols (abfd)                             \
00083                  + (cache_ptr->sym_ptr_ptr - symbols));         \
00084     else if (ptr)                                               \
00085       coffsym = coff_symbol_from (abfd, ptr);                   \
00086     if (coffsym != (coff_symbol_type *) NULL                    \
00087         && coffsym->native->u.syment.n_scnum == 0)              \
00088       cache_ptr->addend = 0;                                    \
00089     else if (ptr && bfd_asymbol_bfd (ptr) == abfd               \
00090              && ptr->section != (asection *) NULL)              \
00091       cache_ptr->addend = - (ptr->section->vma + ptr->value);   \
00092     else                                                        \
00093       cache_ptr->addend = 0;                                    \
00094     if (ptr && (reloc.r_type == 25 || reloc.r_type == 27))     \
00095       cache_ptr->addend += asect->vma;                         \
00096   }
00097 #endif
00098 
00099 #define CALLS  0x66003800   /* Template for 'calls' instruction       */
00100 #define BAL    0x0b000000   /* Template for 'bal' instruction  */
00101 #define BAL_MASK 0x00ffffff
00102 
00103 static bfd_reloc_status_type
00104 optcall_callback (abfd, reloc_entry, symbol_in, data,
00105                 input_section, ignore_bfd, error_message)
00106      bfd *abfd;
00107      arelent *reloc_entry;
00108      asymbol *symbol_in;
00109      PTR data;
00110      asection *input_section;
00111      bfd *ignore_bfd ATTRIBUTE_UNUSED;
00112      char **error_message;
00113 {
00114   /* This item has already been relocated correctly, but we may be
00115    * able to patch in yet better code - done by digging out the
00116    * correct info on this symbol */
00117   bfd_reloc_status_type result;
00118   coff_symbol_type *cs = coffsymbol(symbol_in);
00119 
00120   /* Don't do anything with symbols which aren't tied up yet,
00121      except move the reloc.  */
00122   if (bfd_is_und_section (cs->symbol.section)) {
00123     reloc_entry->address += input_section->output_offset;
00124     return bfd_reloc_ok;
00125   }
00126 
00127   /* So the target symbol has to be of coff type, and the symbol
00128      has to have the correct native information within it */
00129   if ((bfd_asymbol_flavour(&cs->symbol) != bfd_target_coff_flavour)
00130       || (cs->native == (combined_entry_type *)NULL))
00131     {
00132       /* This is interesting, consider the case where we're outputting coff
00133         from a mix n match input, linking from coff to a symbol defined in a
00134         bout file will cause this match to be true. Should I complain?  This
00135         will only work if the bout symbol is non leaf.  */
00136       *error_message =
00137        (char *) _("uncertain calling convention for non-COFF symbol");
00138       result = bfd_reloc_dangerous;
00139     }
00140   else
00141     {
00142     switch (cs->native->u.syment.n_sclass)
00143       {
00144       case C_LEAFSTAT:
00145       case C_LEAFEXT:
00146        /* This is a call to a leaf procedure, replace instruction with a bal
00147           to the correct location.  */
00148        {
00149          union internal_auxent *aux = &((cs->native+2)->u.auxent);
00150          int word = bfd_get_32 (abfd, (bfd_byte *)data + reloc_entry->address);
00151          int olf = (aux->x_bal.x_balntry - cs->native->u.syment.n_value);
00152          BFD_ASSERT(cs->native->u.syment.n_numaux==2);
00153 
00154          /* We replace the original call instruction with a bal to
00155             the bal entry point - the offset of which is described in
00156             the 2nd auxent of the original symbol. We keep the native
00157             sym and auxents untouched, so the delta between the two
00158             is the offset of the bal entry point.  */
00159          word = ((word +  olf)  & BAL_MASK) | BAL;
00160          bfd_put_32 (abfd, (bfd_vma) word,
00161                     (bfd_byte *) data + reloc_entry->address);
00162        }
00163        result = bfd_reloc_ok;
00164        break;
00165       case C_SCALL:
00166        /* This is a call to a system call, replace with a calls to # */
00167        BFD_ASSERT(0);
00168        result = bfd_reloc_ok;
00169        break;
00170       default:
00171        result = bfd_reloc_ok;
00172        break;
00173       }
00174   }
00175   return result;
00176 }
00177 
00178 /* i960 COFF is used by VxWorks 5.1.  However, VxWorks 5.1 does not
00179    appear to correctly handle a reloc against a symbol defined in the
00180    same object file.  It appears to simply discard such relocs, rather
00181    than adding their values into the object file.  We handle this here
00182    by converting all relocs against defined symbols into relocs
00183    against the section symbol, when generating a relocatable output
00184    file.
00185 
00186    Note that this function is only called if we are not using the COFF
00187    specific backend linker.  It only does something when doing a
00188    relocatable link, which will almost certainly fail when not
00189    generating COFF i960 output, so this function is actually no longer
00190    useful.  It was used before this target was converted to use the
00191    COFF specific backend linker.  */
00192 
00193 static bfd_reloc_status_type
00194 coff_i960_relocate (abfd, reloc_entry, symbol, data, input_section,
00195                   output_bfd, error_message)
00196      bfd *abfd;
00197      arelent *reloc_entry;
00198      asymbol *symbol;
00199      PTR data ATTRIBUTE_UNUSED;
00200      asection *input_section ATTRIBUTE_UNUSED;
00201      bfd *output_bfd;
00202      char **error_message ATTRIBUTE_UNUSED;
00203 {
00204   asection *osec;
00205 
00206   if (output_bfd == NULL)
00207     {
00208       /* Not generating relocatable output file.  */
00209       return bfd_reloc_continue;
00210     }
00211 
00212   if (bfd_is_und_section (bfd_get_section (symbol)))
00213     {
00214       /* Symbol is not defined, so no need to worry about it.  */
00215       return bfd_reloc_continue;
00216     }
00217 
00218   if (bfd_is_com_section (bfd_get_section (symbol)))
00219     {
00220       /* I don't really know what the right action is for a common
00221          symbol.  */
00222       return bfd_reloc_continue;
00223     }
00224 
00225   /* Convert the reloc to use the section symbol.  FIXME: This method
00226      is ridiculous.  */
00227   osec = bfd_get_section (symbol)->output_section;
00228   if (coff_section_data (output_bfd, osec) != NULL
00229       && coff_section_data (output_bfd, osec)->tdata != NULL)
00230     reloc_entry->sym_ptr_ptr =
00231       (asymbol **) coff_section_data (output_bfd, osec)->tdata;
00232   else
00233     {
00234       const char *sec_name;
00235       asymbol **syms, **sym_end;
00236 
00237       sec_name = bfd_get_section_name (output_bfd, osec);
00238       syms = bfd_get_outsymbols (output_bfd);
00239       sym_end = syms + bfd_get_symcount (output_bfd);
00240       for (; syms < sym_end; syms++)
00241        {
00242          if (bfd_asymbol_name (*syms) != NULL
00243              && (*syms)->value == 0
00244              && strcmp ((*syms)->section->output_section->name,
00245                       sec_name) == 0)
00246            break;
00247        }
00248 
00249       if (syms >= sym_end)
00250        abort ();
00251 
00252       reloc_entry->sym_ptr_ptr = syms;
00253 
00254       if (coff_section_data (output_bfd, osec) == NULL)
00255        {
00256          bfd_size_type amt = sizeof (struct coff_section_tdata);
00257          osec->used_by_bfd = (PTR) bfd_zalloc (abfd, amt);
00258          if (osec->used_by_bfd == NULL)
00259            return bfd_reloc_overflow;
00260        }
00261       coff_section_data (output_bfd, osec)->tdata = (PTR) syms;
00262     }
00263 
00264   /* Let bfd_perform_relocation do its thing, which will include
00265      stuffing the symbol addend into the object file.  */
00266   return bfd_reloc_continue;
00267 }
00268 
00269 static reloc_howto_type howto_rellong =
00270   HOWTO ((unsigned int) R_RELLONG, 0, 2, 32,FALSE, 0,
00271         complain_overflow_bitfield, coff_i960_relocate,"rellong", TRUE,
00272         0xffffffff, 0xffffffff, 0);
00273 static reloc_howto_type howto_iprmed =
00274   HOWTO (R_IPRMED, 0, 2, 24,TRUE,0, complain_overflow_signed,
00275         coff_i960_relocate, "iprmed ", TRUE, 0x00ffffff, 0x00ffffff, 0);
00276 static reloc_howto_type howto_optcall =
00277   HOWTO (R_OPTCALL, 0,2,24,TRUE,0, complain_overflow_signed,
00278         optcall_callback, "optcall", TRUE, 0x00ffffff, 0x00ffffff, 0);
00279 
00280 static reloc_howto_type *
00281 coff_i960_reloc_type_lookup (abfd, code)
00282      bfd *abfd ATTRIBUTE_UNUSED;
00283      bfd_reloc_code_real_type code;
00284 {
00285   switch (code)
00286     {
00287     default:
00288       return 0;
00289     case BFD_RELOC_I960_CALLJ:
00290       return &howto_optcall;
00291     case BFD_RELOC_32:
00292     case BFD_RELOC_CTOR:
00293       return &howto_rellong;
00294     case BFD_RELOC_24_PCREL:
00295       return &howto_iprmed;
00296     }
00297 }
00298 
00299 static reloc_howto_type *
00300 coff_i960_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
00301                           const char *r_name)
00302 {
00303   if (strcasecmp (howto_optcall.name, r_name) == 0)
00304     return &howto_optcall;
00305   if (strcasecmp (howto_rellong.name, r_name) == 0)
00306     return &howto_rellong;
00307   if (strcasecmp (howto_iprmed.name, r_name) == 0)
00308     return &howto_iprmed;
00309 
00310   return NULL;
00311 }
00312 
00313 /* The real code is in coffcode.h */
00314 
00315 #define RTYPE2HOWTO(cache_ptr, dst) \
00316 {                                                \
00317    reloc_howto_type *howto_ptr;                         \
00318    switch ((dst)->r_type) {                      \
00319      case 17: howto_ptr = &howto_rellong; break; \
00320      case 25: howto_ptr = &howto_iprmed; break;         \
00321      case 27: howto_ptr = &howto_optcall; break; \
00322      default: howto_ptr = 0; break;                     \
00323      }                                           \
00324    (cache_ptr)->howto = howto_ptr;               \
00325  }
00326 
00327 /* i960 COFF is used by VxWorks 5.1.  However, VxWorks 5.1 does not
00328    appear to correctly handle a reloc against a symbol defined in the
00329    same object file.  It appears to simply discard such relocs, rather
00330    than adding their values into the object file.  We handle this by
00331    converting all relocs against global symbols into relocs against
00332    internal symbols at the start of the section.  This routine is
00333    called at the start of the linking process, and it creates the
00334    necessary symbols.  */
00335 
00336 static bfd_boolean
00337 coff_i960_start_final_link (abfd, info)
00338      bfd *abfd;
00339      struct bfd_link_info *info;
00340 {
00341   bfd_size_type symesz = bfd_coff_symesz (abfd);
00342   asection *o;
00343   bfd_byte *esym;
00344 
00345   if (! info->relocatable)
00346     return TRUE;
00347 
00348   esym = (bfd_byte *) bfd_malloc (symesz);
00349   if (esym == NULL)
00350     return FALSE;
00351 
00352   if (bfd_seek (abfd, obj_sym_filepos (abfd), SEEK_SET) != 0)
00353     return FALSE;
00354 
00355   for (o = abfd->sections; o != NULL; o = o->next)
00356     {
00357       struct internal_syment isym;
00358 
00359       strncpy (isym._n._n_name, o->name, SYMNMLEN);
00360       isym.n_value = 0;
00361       isym.n_scnum = o->target_index;
00362       isym.n_type = T_NULL;
00363       isym.n_sclass = C_STAT;
00364       isym.n_numaux = 0;
00365 
00366       bfd_coff_swap_sym_out (abfd, (PTR) &isym, (PTR) esym);
00367 
00368       if (bfd_bwrite (esym, symesz, abfd) != symesz)
00369        {
00370          free (esym);
00371          return FALSE;
00372        }
00373 
00374       obj_raw_syment_count (abfd) += 1;
00375     }
00376 
00377   free (esym);
00378 
00379   return TRUE;
00380 }
00381 
00382 /* The reloc processing routine for the optimized COFF linker.  */
00383 
00384 static bfd_boolean
00385 coff_i960_relocate_section (output_bfd, info, input_bfd, input_section,
00386                          contents, relocs, syms, sections)
00387      bfd *output_bfd ATTRIBUTE_UNUSED;
00388      struct bfd_link_info *info;
00389      bfd *input_bfd;
00390      asection *input_section;
00391      bfd_byte *contents;
00392      struct internal_reloc *relocs;
00393      struct internal_syment *syms;
00394      asection **sections;
00395 {
00396   struct internal_reloc *rel;
00397   struct internal_reloc *relend;
00398 
00399   rel = relocs;
00400   relend = rel + input_section->reloc_count;
00401   for (; rel < relend; rel++)
00402     {
00403       long symndx;
00404       struct coff_link_hash_entry *h;
00405       struct internal_syment *sym;
00406       bfd_vma addend;
00407       bfd_vma val;
00408       reloc_howto_type *howto;
00409       bfd_reloc_status_type rstat = bfd_reloc_ok;
00410       bfd_boolean done;
00411 
00412       symndx = rel->r_symndx;
00413 
00414       if (symndx == -1)
00415        {
00416          h = NULL;
00417          sym = NULL;
00418        }
00419       else
00420        {
00421          h = obj_coff_sym_hashes (input_bfd)[symndx];
00422          sym = syms + symndx;
00423        }
00424 
00425       if (sym != NULL && sym->n_scnum != 0)
00426        addend = - sym->n_value;
00427       else
00428        addend = 0;
00429 
00430       switch (rel->r_type)
00431        {
00432        case 17: howto = &howto_rellong; break;
00433        case 25: howto = &howto_iprmed; break;
00434        case 27: howto = &howto_optcall; break;
00435        default:
00436          bfd_set_error (bfd_error_bad_value);
00437          return FALSE;
00438        }
00439 
00440       val = 0;
00441 
00442       if (h == NULL)
00443        {
00444          asection *sec;
00445 
00446          if (symndx == -1)
00447            {
00448              sec = bfd_abs_section_ptr;
00449              val = 0;
00450            }
00451          else
00452            {
00453              sec = sections[symndx];
00454               val = (sec->output_section->vma
00455                    + sec->output_offset
00456                    + sym->n_value
00457                    - sec->vma);
00458            }
00459        }
00460       else
00461        {
00462          if (h->root.type == bfd_link_hash_defined
00463              || h->root.type == bfd_link_hash_defweak)
00464            {
00465              asection *sec;
00466 
00467              sec = h->root.u.def.section;
00468              val = (h->root.u.def.value
00469                    + sec->output_section->vma
00470                    + sec->output_offset);
00471            }
00472          else if (! info->relocatable)
00473            {
00474              if (! ((*info->callbacks->undefined_symbol)
00475                    (info, h->root.root.string, input_bfd, input_section,
00476                     rel->r_vaddr - input_section->vma, TRUE)))
00477               return FALSE;
00478            }
00479        }
00480 
00481       done = FALSE;
00482 
00483       if (howto->type == R_OPTCALL && ! info->relocatable && symndx != -1)
00484        {
00485          int class;
00486 
00487          if (h != NULL)
00488            class = h->class;
00489          else
00490            class = sym->n_sclass;
00491 
00492          switch (class)
00493            {
00494            case C_NULL:
00495              /* This symbol is apparently not from a COFF input file.
00496                  We warn, and then assume that it is not a leaf
00497                  function.  */
00498              if (! ((*info->callbacks->reloc_dangerous)
00499                    (info,
00500                     _("uncertain calling convention for non-COFF symbol"),
00501                     input_bfd, input_section,
00502                     rel->r_vaddr - input_section->vma)))
00503               return FALSE;
00504              break;
00505            case C_LEAFSTAT:
00506            case C_LEAFEXT:
00507              /* This is a call to a leaf procedure; use the bal
00508                  instruction.  */
00509              {
00510               long olf;
00511               unsigned long word;
00512 
00513               if (h != NULL)
00514                 {
00515                   BFD_ASSERT (h->numaux == 2);
00516                   olf = h->aux[1].x_bal.x_balntry;
00517                 }
00518               else
00519                 {
00520                   bfd_byte *esyms;
00521                   union internal_auxent aux;
00522 
00523                   BFD_ASSERT (sym->n_numaux == 2);
00524                   esyms = (bfd_byte *) obj_coff_external_syms (input_bfd);
00525                   esyms += (symndx + 2) * bfd_coff_symesz (input_bfd);
00526                   bfd_coff_swap_aux_in (input_bfd, (PTR) esyms, sym->n_type,
00527                                      sym->n_sclass, 1, sym->n_numaux,
00528                                      (PTR) &aux);
00529                   olf = aux.x_bal.x_balntry;
00530                 }
00531 
00532               word = bfd_get_32 (input_bfd,
00533                                (contents
00534                                 + (rel->r_vaddr - input_section->vma)));
00535               word = ((word + olf - val) & BAL_MASK) | BAL;
00536               bfd_put_32 (input_bfd,
00537                          (bfd_vma) word,
00538                          contents + (rel->r_vaddr - input_section->vma));
00539               done = TRUE;
00540              }
00541              break;
00542            case C_SCALL:
00543              BFD_ASSERT (0);
00544              break;
00545            }
00546        }
00547 
00548       if (! done)
00549        {
00550          if (howto->pc_relative)
00551            addend += input_section->vma;
00552          rstat = _bfd_final_link_relocate (howto, input_bfd, input_section,
00553                                        contents,
00554                                        rel->r_vaddr - input_section->vma,
00555                                        val, addend);
00556        }
00557 
00558       switch (rstat)
00559        {
00560        default:
00561          abort ();
00562        case bfd_reloc_ok:
00563          break;
00564        case bfd_reloc_overflow:
00565          {
00566            const char *name;
00567            char buf[SYMNMLEN + 1];
00568 
00569            if (symndx == -1)
00570              name = "*ABS*";
00571            else if (h != NULL)
00572              name = NULL;
00573            else
00574              {
00575               name = _bfd_coff_internal_syment_name (input_bfd, sym, buf);
00576               if (name == NULL)
00577                 return FALSE;
00578              }
00579 
00580            if (! ((*info->callbacks->reloc_overflow)
00581                  (info, (h ? &h->root : NULL), name, howto->name,
00582                   (bfd_vma) 0, input_bfd, input_section,
00583                   rel->r_vaddr - input_section->vma)))
00584              return FALSE;
00585          }
00586        }
00587     }
00588 
00589   return TRUE;
00590 }
00591 
00592 /* Adjust the symbol index of any reloc against a global symbol to
00593    instead be a reloc against the internal symbol we created specially
00594    for the section.  */
00595 
00596 static bfd_boolean
00597 coff_i960_adjust_symndx (obfd, info, ibfd, sec, irel, adjustedp)
00598      bfd *obfd ATTRIBUTE_UNUSED;
00599      struct bfd_link_info *info ATTRIBUTE_UNUSED;
00600      bfd *ibfd;
00601      asection *sec ATTRIBUTE_UNUSED;
00602      struct internal_reloc *irel;
00603      bfd_boolean *adjustedp;
00604 {
00605   struct coff_link_hash_entry *h;
00606 
00607   *adjustedp = FALSE;
00608 
00609   h = obj_coff_sym_hashes (ibfd)[irel->r_symndx];
00610   if (h == NULL
00611       || (h->root.type != bfd_link_hash_defined
00612          && h->root.type != bfd_link_hash_defweak))
00613     return TRUE;
00614 
00615   irel->r_symndx = h->root.u.def.section->output_section->target_index - 1;
00616   *adjustedp = TRUE;
00617 
00618   return TRUE;
00619 }
00620 
00621 #define coff_bfd_is_local_label_name coff_i960_is_local_label_name
00622 
00623 #define coff_start_final_link coff_i960_start_final_link
00624 
00625 #define coff_relocate_section coff_i960_relocate_section
00626 
00627 #define coff_adjust_symndx coff_i960_adjust_symndx
00628 
00629 #define coff_bfd_reloc_type_lookup coff_i960_reloc_type_lookup
00630 #define coff_bfd_reloc_name_lookup coff_i960_reloc_name_lookup
00631 
00632 #include "coffcode.h"
00633 
00634 extern const bfd_target icoff_big_vec;
00635 
00636 CREATE_LITTLE_COFF_TARGET_VEC (icoff_little_vec, "coff-Intel-little", 0, 0, '_', & icoff_big_vec, COFF_SWAP_TABLE)
00637 
00638 const bfd_target icoff_big_vec =
00639 {
00640   "coff-Intel-big",         /* name */
00641   bfd_target_coff_flavour,
00642   BFD_ENDIAN_LITTLE,        /* data byte order is little */
00643   BFD_ENDIAN_BIG,           /* header byte order is big */
00644 
00645   (HAS_RELOC | EXEC_P |            /* object flags */
00646    HAS_LINENO | HAS_DEBUG |
00647    HAS_SYMS | HAS_LOCALS | WP_TEXT),
00648 
00649   (SEC_HAS_CONTENTS | SEC_ALLOC | SEC_LOAD | SEC_RELOC), /* section flags */
00650   '_',                      /* leading underscore */
00651   '/',                      /* ar_pad_char */
00652   15,                       /* ar_max_namelen */
00653 
00654 bfd_getl64, bfd_getl_signed_64, bfd_putl64,
00655      bfd_getl32, bfd_getl_signed_32, bfd_putl32,
00656      bfd_getl16, bfd_getl_signed_16, bfd_putl16, /* data */
00657 bfd_getb64, bfd_getb_signed_64, bfd_putb64,
00658      bfd_getb32, bfd_getb_signed_32, bfd_putb32,
00659      bfd_getb16, bfd_getb_signed_16, bfd_putb16, /* hdrs */
00660 
00661   {_bfd_dummy_target, coff_object_p, /* bfd_check_format */
00662      bfd_generic_archive_p, _bfd_dummy_target},
00663   {bfd_false, coff_mkobject,       /* bfd_set_format */
00664      _bfd_generic_mkarchive, bfd_false},
00665   {bfd_false, coff_write_object_contents, /* bfd_write_contents */
00666      _bfd_write_archive_contents, bfd_false},
00667 
00668      BFD_JUMP_TABLE_GENERIC (coff),
00669      BFD_JUMP_TABLE_COPY (coff),
00670      BFD_JUMP_TABLE_CORE (_bfd_nocore),
00671      BFD_JUMP_TABLE_ARCHIVE (_bfd_archive_coff),
00672      BFD_JUMP_TABLE_SYMBOLS (coff),
00673      BFD_JUMP_TABLE_RELOCS (coff),
00674      BFD_JUMP_TABLE_WRITE (coff),
00675      BFD_JUMP_TABLE_LINK (coff),
00676      BFD_JUMP_TABLE_DYNAMIC (_bfd_nodynamic),
00677 
00678   & icoff_little_vec,
00679 
00680   COFF_SWAP_TABLE
00681 };