Back to index

cell-binutils  2.17cvs20070401
coff-mcore.c
Go to the documentation of this file.
00001 /* BFD back-end for Motorola MCore COFF/PE
00002    Copyright 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2007
00003    Free Software Foundation, Inc.
00004 
00005 This file is part of BFD, the Binary File Descriptor library.
00006 
00007 This program is free software; you can redistribute it and/or modify
00008 it under the terms of the GNU General Public License as published by
00009 the Free Software Foundation; either version 2 of the License, or
00010 (at your option) any later version.
00011 
00012 This program is distributed in the hope that it will be useful,
00013 but WITHOUT ANY WARRANTY; without even the implied warranty of
00014 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015 GNU General Public License for more details.
00016 
00017 You should have received a copy of the GNU General Public License
00018 along with this program; if not, write to the Free Software
00019 Foundation, 51 Franklin Street - Fifth Floor,
00020 Boston, MA 02110-1301, USA.  */
00021 
00022 #include "bfd.h"
00023 #include "sysdep.h"
00024 #include "libbfd.h"
00025 #include "coff/mcore.h"
00026 #include "coff/internal.h"
00027 #include "coff/pe.h"
00028 #include "libcoff.h"
00029 
00030 #ifdef BADMAG
00031 #undef BADMAG
00032 #endif
00033 #define BADMAG(x) MCOREBADMAG(x)
00034 
00035 #ifndef NUM_ELEM
00036 #define NUM_ELEM(A) (sizeof (A) / sizeof (A)[0])
00037 #endif
00038 
00039 /* This file is compiled more than once, but we only compile the
00040    final_link routine once.  */
00041 extern bfd_boolean mcore_bfd_coff_final_link
00042   PARAMS ((bfd *, struct bfd_link_info *));
00043 static bfd_reloc_status_type mcore_coff_unsupported_reloc
00044   PARAMS ((bfd *, arelent *, asymbol *, PTR, asection *, bfd *, char **));
00045 static bfd_boolean coff_mcore_relocate_section
00046   PARAMS ((bfd *, struct bfd_link_info *, bfd *, asection *, bfd_byte *,
00047           struct internal_reloc *, struct internal_syment *, asection **));
00048 static reloc_howto_type *mcore_coff_reloc_type_lookup
00049   PARAMS ((bfd *, bfd_reloc_code_real_type));
00050 static reloc_howto_type *coff_mcore_rtype_to_howto
00051   PARAMS ((bfd *, asection *, struct internal_reloc *,
00052           struct coff_link_hash_entry *, struct internal_syment *,
00053           bfd_vma *));
00054 static void mcore_emit_base_file_entry
00055   PARAMS ((struct bfd_link_info *, bfd *, asection *, bfd_vma));
00056 static bfd_boolean in_reloc_p PARAMS ((bfd *, reloc_howto_type *));
00057 
00058 /* The NT loader points the toc register to &toc + 32768, in order to
00059    use the complete range of a 16-bit displacement. We have to adjust
00060    for this when we fix up loads displaced off the toc reg.  */
00061 #define TOC_LOAD_ADJUSTMENT (-32768)
00062 #define TOC_SECTION_NAME ".private.toc"
00063 
00064 /* The main body of code is in coffcode.h.  */
00065 #define COFF_DEFAULT_SECTION_ALIGNMENT_POWER 2
00066 
00067 /* In case we're on a 32-bit machine, construct a 64-bit "-1" value
00068    from smaller values.  Start with zero, widen, *then* decrement.  */
00069 #define MINUS_ONE    (((bfd_vma)0) - 1)
00070 
00071 static reloc_howto_type mcore_coff_howto_table[] =
00072 {
00073   /* Unused: */
00074   HOWTO (IMAGE_REL_MCORE_ABSOLUTE,/* type */
00075         0,                     /* rightshift */
00076         0,                     /* size (0 = byte, 1 = short, 2 = long) */
00077         0,                     /* bitsize */
00078         FALSE,                        /* pc_relative */
00079         0,                     /* bitpos */
00080         complain_overflow_dont, /* dont complain_on_overflow */
00081         NULL,                 /* special_function */
00082         "ABSOLUTE",             /* name */
00083         FALSE,                        /* partial_inplace */
00084         0x00,                 /* src_mask */
00085         0x00,                       /* dst_mask */
00086         FALSE),                 /* pcrel_offset */
00087 
00088   HOWTO (IMAGE_REL_MCORE_ADDR32,/* type */
00089         0,                    /* rightshift */
00090         2,                    /* size (0 = byte, 1 = short, 2 = long) */
00091         32,                   /* bitsize */
00092         FALSE,                       /* pc_relative */
00093         0,                    /* bitpos */
00094         complain_overflow_bitfield, /* complain_on_overflow */
00095         NULL,                /* special_function */
00096         "ADDR32",              /* name */
00097         TRUE,                 /* partial_inplace */
00098         0xffffffff,            /* src_mask */
00099         0xffffffff,            /* dst_mask */
00100         FALSE),                /* pcrel_offset */
00101 
00102   /* 8 bits + 2 zero bits; jmpi/jsri/lrw instructions.
00103      Should not appear in object files.  */
00104   HOWTO (IMAGE_REL_MCORE_PCREL_IMM8BY4,   /* type */
00105         2,                  /* rightshift */
00106         1,                  /* size (0 = byte, 1 = short, 2 = long) */
00107         8,                  /* bitsize */
00108         TRUE,               /* pc_relative */
00109         0,                  /* bitpos */
00110         complain_overflow_bitfield, /* complain_on_overflow */
00111         mcore_coff_unsupported_reloc, /* special_function */
00112         "IMM8BY4",             /* name */
00113         FALSE,                     /* partial_inplace */
00114         0,                  /* src_mask */
00115         0,                  /* dst_mask */
00116         TRUE),                     /* pcrel_offset */
00117 
00118   /* bsr/bt/bf/br instructions; 11 bits + 1 zero bit
00119      Span 2k instructions == 4k bytes.
00120      Only useful pieces at the relocated address are the opcode (5 bits) */
00121   HOWTO (IMAGE_REL_MCORE_PCREL_IMM11BY2,/* type */
00122         1,                  /* rightshift */
00123         1,                  /* size (0 = byte, 1 = short, 2 = long) */
00124         11,                 /* bitsize */
00125         TRUE,               /* pc_relative */
00126         0,                  /* bitpos */
00127         complain_overflow_signed, /* complain_on_overflow */
00128         NULL,                 /* special_function */
00129         "IMM11BY2",            /* name */
00130         FALSE,                     /* partial_inplace */
00131         0x0,                /* src_mask */
00132         0x7ff,                     /* dst_mask */
00133         TRUE),                     /* pcrel_offset */
00134 
00135   /* 4 bits + 1 zero bit; 'loopt' instruction only; unsupported.  */
00136   HOWTO (IMAGE_REL_MCORE_PCREL_IMM4BY2,   /* type */
00137         1,                  /* rightshift */
00138         1,                  /* size (0 = byte, 1 = short, 2 = long) */
00139         4,                  /* bitsize */
00140         TRUE,               /* pc_relative */
00141         0,                  /* bitpos */
00142         complain_overflow_bitfield, /* complain_on_overflow */
00143         mcore_coff_unsupported_reloc, /* special_function */
00144         "IMM4BY2",              /* name */
00145         FALSE,                     /* partial_inplace */
00146         0,                  /* src_mask */
00147         0,                  /* dst_mask */
00148         TRUE),                     /* pcrel_offset */
00149 
00150   /* 32-bit pc-relative. Eventually this will help support PIC code.  */
00151   HOWTO (IMAGE_REL_MCORE_PCREL_32,/* type */
00152         0,                  /* rightshift */
00153         2,                  /* size (0 = byte, 1 = short, 2 = long) */
00154         32,                 /* bitsize */
00155         TRUE,               /* pc_relative */
00156         0,                  /* bitpos */
00157         complain_overflow_bitfield, /* complain_on_overflow */
00158         NULL,                 /* special_function */
00159         "PCREL_32",          /* name */
00160         FALSE,                     /* partial_inplace */
00161         0x0,                /* src_mask */
00162         0xffffffff,         /* dst_mask */
00163         TRUE),                     /* pcrel_offset */
00164 
00165   /* Like PCREL_IMM11BY2, this relocation indicates that there is a
00166      'jsri' at the specified address. There is a separate relocation
00167      entry for the literal pool entry that it references, but we
00168      might be able to change the jsri to a bsr if the target turns out
00169      to be close enough [even though we won't reclaim the literal pool
00170      entry, we'll get some runtime efficiency back]. Note that this
00171      is a relocation that we are allowed to safely ignore.  */
00172   HOWTO (IMAGE_REL_MCORE_PCREL_JSR_IMM11BY2,/* type */
00173         1,                  /* rightshift */
00174         1,                  /* size (0 = byte, 1 = short, 2 = long) */
00175         11,                 /* bitsize */
00176         TRUE,               /* pc_relative */
00177         0,                  /* bitpos */
00178         complain_overflow_signed, /* complain_on_overflow */
00179         NULL,                 /* special_function */
00180         "JSR_IMM11BY2",        /* name */
00181         FALSE,                     /* partial_inplace */
00182         0x0,                /* src_mask */
00183         0x7ff,                     /* dst_mask */
00184         TRUE),                     /* pcrel_offset */
00185 
00186   HOWTO (IMAGE_REL_MCORE_RVA,   /* type */
00187         0,                  /* rightshift */
00188         2,                  /* size (0 = byte, 1 = short, 2 = long) */
00189         32,                 /* bitsize */
00190         FALSE,                     /* pc_relative */
00191         0,                  /* bitpos */
00192         complain_overflow_signed, /* complain_on_overflow */
00193         NULL,                  /* special_function */
00194         "MCORE_RVA",           /* name */
00195         TRUE,               /* partial_inplace */
00196         0xffffffff,         /* src_mask */
00197         0xffffffff,         /* dst_mask */
00198         TRUE)               /* pcrel_offset */
00199 };
00200 
00201 /* Extend the coff_link_hash_table structure with a few M*Core specific fields.
00202    This allows us to store global data here without actually creating any
00203    global variables, which is a no-no in the BFD world.  */
00204 typedef struct coff_mcore_link_hash_table
00205 {
00206   /* The original coff_link_hash_table structure.  MUST be first field.  */
00207   struct coff_link_hash_table      root;
00208 
00209   bfd *                         bfd_of_toc_owner;
00210   long int                      global_toc_size;
00211   long int                      import_table_size;
00212   long int                      first_thunk_address;
00213   long int                      thunk_size;
00214 }
00215 mcore_hash_table;
00216 
00217 /* Get the MCore coff linker hash table from a link_info structure.  */
00218 #define coff_mcore_hash_table(info) \
00219   ((mcore_hash_table *) ((info)->hash))
00220 
00221 
00222 /* Add an entry to the base file.  */
00223 
00224 static void
00225 mcore_emit_base_file_entry (info, output_bfd, input_section, reloc_offset)
00226       struct bfd_link_info * info;
00227       bfd *                  output_bfd;
00228       asection *             input_section;
00229       bfd_vma                reloc_offset;
00230 {
00231   bfd_vma addr = reloc_offset
00232                  - input_section->vma
00233                  + input_section->output_offset
00234                  + input_section->output_section->vma;
00235 
00236   if (coff_data (output_bfd)->pe)
00237      addr -= pe_data (output_bfd)->pe_opthdr.ImageBase;
00238 
00239   fwrite (&addr, 1, sizeof (addr), (FILE *) info->base_file);
00240 }
00241 
00242 static bfd_reloc_status_type
00243 mcore_coff_unsupported_reloc (abfd, reloc_entry, symbol, data, input_section,
00244                         output_bfd, error_message)
00245      bfd * abfd;
00246      arelent * reloc_entry;
00247      asymbol * symbol ATTRIBUTE_UNUSED;
00248      PTR data ATTRIBUTE_UNUSED;
00249      asection * input_section ATTRIBUTE_UNUSED;
00250      bfd * output_bfd ATTRIBUTE_UNUSED;
00251      char ** error_message ATTRIBUTE_UNUSED;
00252 {
00253   BFD_ASSERT (reloc_entry->howto != (reloc_howto_type *)0);
00254 
00255   _bfd_error_handler (_("%B: Relocation %s (%d) is not currently supported.\n"),
00256                     abfd,
00257                     reloc_entry->howto->name,
00258                     reloc_entry->howto->type);
00259 
00260   return bfd_reloc_notsupported;
00261 }
00262 
00263 /* A cheesy little macro to make the code a little more readable.  */
00264 #define HOW2MAP(bfd_rtype, mcore_rtype)  \
00265  case bfd_rtype: return & mcore_coff_howto_table [mcore_rtype]
00266 
00267 static reloc_howto_type *
00268 mcore_coff_reloc_type_lookup (abfd, code)
00269      bfd * abfd ATTRIBUTE_UNUSED;
00270      bfd_reloc_code_real_type code;
00271 {
00272   switch (code)
00273     {
00274       HOW2MAP (BFD_RELOC_32,                       IMAGE_REL_MCORE_ADDR32);
00275       HOW2MAP (BFD_RELOC_MCORE_PCREL_IMM8BY4,      IMAGE_REL_MCORE_PCREL_IMM8BY4);
00276       HOW2MAP (BFD_RELOC_MCORE_PCREL_IMM11BY2,     IMAGE_REL_MCORE_PCREL_IMM11BY2);
00277       HOW2MAP (BFD_RELOC_MCORE_PCREL_IMM4BY2,      IMAGE_REL_MCORE_PCREL_IMM4BY2);
00278       HOW2MAP (BFD_RELOC_32_PCREL,                 IMAGE_REL_MCORE_PCREL_32);
00279       HOW2MAP (BFD_RELOC_MCORE_PCREL_JSR_IMM11BY2, IMAGE_REL_MCORE_PCREL_JSR_IMM11BY2);
00280       HOW2MAP (BFD_RELOC_RVA,                      IMAGE_REL_MCORE_RVA);
00281    default:
00282       return NULL;
00283     }
00284   /*NOTREACHED*/
00285 }
00286 #undef HOW2MAP
00287 
00288 static reloc_howto_type *
00289 mcore_coff_reloc_name_lookup (bfd *abfd ATTRIBUTE_UNUSED,
00290                            const char *r_name)
00291 {
00292   unsigned int i;
00293 
00294   for (i = 0;
00295        i < (sizeof (mcore_coff_howto_table)
00296            / sizeof (mcore_coff_howto_table[0]));
00297        i++)
00298     if (mcore_coff_howto_table[i].name != NULL
00299        && strcasecmp (mcore_coff_howto_table[i].name, r_name) == 0)
00300       return &mcore_coff_howto_table[i];
00301 
00302   return NULL;
00303 }
00304 
00305 #define RTYPE2HOWTO(cache_ptr, dst) \
00306   (cache_ptr)->howto = mcore_coff_howto_table + (dst)->r_type;
00307 
00308 static reloc_howto_type *
00309 coff_mcore_rtype_to_howto (abfd, sec, rel, h, sym, addendp)
00310      bfd * abfd ATTRIBUTE_UNUSED;
00311      asection * sec;
00312      struct internal_reloc * rel;
00313      struct coff_link_hash_entry * h ATTRIBUTE_UNUSED;
00314      struct internal_syment * sym;
00315      bfd_vma * addendp;
00316 {
00317   reloc_howto_type * howto;
00318 
00319   if (rel->r_type >= NUM_ELEM (mcore_coff_howto_table))
00320     return NULL;
00321 
00322   howto = mcore_coff_howto_table + rel->r_type;
00323 
00324   if (rel->r_type == IMAGE_REL_MCORE_RVA)
00325     * addendp -= pe_data (sec->output_section->owner)->pe_opthdr.ImageBase;
00326 
00327   else if (howto->pc_relative)
00328     {
00329       * addendp = sec->vma - 2; /* XXX guess - is this right ? */
00330 
00331       /* If the symbol is defined, then the generic code is going to
00332          add back the symbol value in order to cancel out an
00333          adjustment it made to the addend.  However, we set the addend
00334          to 0 at the start of this function.  We need to adjust here,
00335          to avoid the adjustment the generic code will make.  FIXME:
00336          This is getting a bit hackish.  */
00337       if (sym != NULL && sym->n_scnum != 0)
00338        * addendp -= sym->n_value;
00339     }
00340   else
00341     * addendp = 0;
00342 
00343   return howto;
00344 }
00345 
00346 /* Return TRUE if this relocation should appear in the output .reloc section.
00347    This function is referenced in pe_mkobject in peicode.h.  */
00348 
00349 static bfd_boolean
00350 in_reloc_p (abfd, howto)
00351      bfd * abfd ATTRIBUTE_UNUSED;
00352      reloc_howto_type * howto;
00353 {
00354   return ! howto->pc_relative && howto->type != IMAGE_REL_MCORE_RVA;
00355 }
00356 
00357 /* The reloc processing routine for the optimized COFF linker.  */
00358 static bfd_boolean
00359 coff_mcore_relocate_section (output_bfd, info, input_bfd, input_section,
00360                         contents, relocs, syms, sections)
00361      bfd * output_bfd;
00362      struct bfd_link_info * info;
00363      bfd * input_bfd;
00364      asection * input_section;
00365      bfd_byte * contents;
00366      struct internal_reloc * relocs;
00367      struct internal_syment * syms;
00368      asection ** sections;
00369 {
00370   struct internal_reloc * rel;
00371   struct internal_reloc * relend;
00372   bfd_boolean hihalf;
00373   bfd_vma hihalf_val;
00374 
00375   /* If we are performing a relocatable link, we don't need to do a
00376      thing.  The caller will take care of adjusting the reloc
00377      addresses and symbol indices.  */
00378   if (info->relocatable)
00379     return TRUE;
00380 
00381   /* Check if we have the same endianess */
00382   if (   input_bfd->xvec->byteorder != output_bfd->xvec->byteorder
00383       && output_bfd->xvec->byteorder != BFD_ENDIAN_UNKNOWN)
00384     {
00385       (*_bfd_error_handler)
00386        (_("%B: compiled for a %s system and target is %s.\n"),
00387         input_bfd,
00388          bfd_big_endian (input_bfd) ? _("big endian") : _("little endian"),
00389          bfd_big_endian (output_bfd) ? _("big endian") : _("little endian"));
00390 
00391       bfd_set_error (bfd_error_wrong_format);
00392       return FALSE;
00393     }
00394 
00395   hihalf = FALSE;
00396   hihalf_val = 0;
00397 
00398   rel = relocs;
00399   relend = rel + input_section->reloc_count;
00400 
00401   for (; rel < relend; rel++)
00402     {
00403       long                           symndx;
00404       struct internal_syment *       sym;
00405       bfd_vma                        val;
00406       bfd_vma                        addend;
00407       bfd_reloc_status_type          rstat;
00408       bfd_byte *                     loc;
00409       unsigned short                 r_type = rel->r_type;
00410       reloc_howto_type *             howto = NULL;
00411       struct coff_link_hash_entry *  h;
00412       const char *                   my_name;
00413 
00414       symndx = rel->r_symndx;
00415       loc = contents + rel->r_vaddr - input_section->vma;
00416 
00417       if (symndx == -1)
00418        {
00419          h = NULL;
00420          sym = NULL;
00421        }
00422       else
00423        {
00424          h = obj_coff_sym_hashes (input_bfd)[symndx];
00425          sym = syms + symndx;
00426        }
00427 
00428       addend = 0;
00429 
00430       /* Get the howto and initialise the addend.  */
00431       howto = bfd_coff_rtype_to_howto (input_bfd, input_section, rel, h,
00432                                    sym, & addend);
00433       if (howto == NULL)
00434        return FALSE;
00435 
00436       val = 0;
00437 
00438       if (h == NULL)
00439        {
00440          if (symndx == -1)
00441            my_name = "*ABS*";
00442          else
00443            {
00444              asection * sec = sections[symndx];
00445 
00446              val = (sym->n_value
00447                    + sec->output_section->vma
00448                    + sec->output_offset);
00449 
00450              if (sym == NULL)
00451               my_name = "*unknown*";
00452              else if (   sym->_n._n_n._n_zeroes == 0
00453                      && sym->_n._n_n._n_offset != 0)
00454               my_name = obj_coff_strings (input_bfd) + sym->_n._n_n._n_offset;
00455              else
00456               {
00457                 static char buf [SYMNMLEN + 1];
00458 
00459                 strncpy (buf, sym->_n._n_name, SYMNMLEN);
00460                 buf[SYMNMLEN] = '\0';
00461                 my_name = buf;
00462               }
00463            }
00464        }
00465       else
00466        {
00467          if (   h->root.type == bfd_link_hash_defined
00468              || h->root.type == bfd_link_hash_defweak)
00469            {
00470              asection * sec = h->root.u.def.section;
00471 
00472              val = (h->root.u.def.value
00473                    + sec->output_section->vma
00474                    + sec->output_offset);
00475            }
00476          else
00477            {
00478              if (! ((*info->callbacks->undefined_symbol)
00479                    (info, h->root.root.string, input_bfd, input_section,
00480                     rel->r_vaddr - input_section->vma, TRUE)))
00481               return FALSE;
00482            }
00483 
00484          my_name = h->root.root.string;
00485        }
00486 
00487       rstat = bfd_reloc_ok;
00488 
00489       /* Each case must do its own relocation, setting rstat appropriately.  */
00490       switch (r_type)
00491        {
00492        default:
00493          _bfd_error_handler (_("%B: unsupported relocation type 0x%02x"),
00494                            input_bfd, r_type);
00495          bfd_set_error (bfd_error_bad_value);
00496          return FALSE;
00497 
00498        case IMAGE_REL_MCORE_ABSOLUTE:
00499          _bfd_error_handler
00500            (_("Warning: unsupported reloc %s <file %B, section %A>\n"
00501               "sym %ld (%s), r_vaddr %ld (%lx)"),
00502             input_bfd, input_section, howto->name,
00503             rel->r_symndx, my_name, (long) rel->r_vaddr,
00504             (unsigned long) rel->r_vaddr);
00505          break;
00506 
00507        case IMAGE_REL_MCORE_PCREL_IMM8BY4:
00508        case IMAGE_REL_MCORE_PCREL_IMM11BY2:
00509        case IMAGE_REL_MCORE_PCREL_IMM4BY2:
00510        case IMAGE_REL_MCORE_PCREL_32:
00511        case IMAGE_REL_MCORE_PCREL_JSR_IMM11BY2:
00512        case IMAGE_REL_MCORE_ADDR32:
00513          /* XXX fixme - shouldn't this be like the code for the RVA reloc ? */
00514          rstat = _bfd_relocate_contents (howto, input_bfd, val, loc);
00515          break;
00516 
00517        case IMAGE_REL_MCORE_RVA:
00518          rstat = _bfd_final_link_relocate
00519            (howto, input_bfd,
00520             input_section, contents, rel->r_vaddr - input_section->vma,
00521             val, addend);
00522          break;
00523        }
00524 
00525       if (info->base_file)
00526        {
00527          /* Emit a reloc if the backend thinks it needs it.  */
00528          if (sym && pe_data (output_bfd)->in_reloc_p (output_bfd, howto))
00529             mcore_emit_base_file_entry (info, output_bfd, input_section, rel->r_vaddr);
00530        }
00531 
00532       switch (rstat)
00533        {
00534        default:
00535          abort ();
00536 
00537        case bfd_reloc_ok:
00538          break;
00539 
00540        case bfd_reloc_overflow:
00541          if (! ((*info->callbacks->reloc_overflow)
00542                (info, (h ? &h->root : NULL), my_name, howto->name,
00543                 (bfd_vma) 0, input_bfd,
00544                 input_section, rel->r_vaddr - input_section->vma)))
00545            return FALSE;
00546        }
00547     }
00548 
00549   return TRUE;
00550 }
00551 
00552 /* Tailor coffcode.h -- macro heaven.  */
00553 
00554 /* We use the special COFF backend linker, with our own special touch.  */
00555 
00556 #define coff_bfd_reloc_type_lookup   mcore_coff_reloc_type_lookup
00557 #define coff_bfd_reloc_name_lookup mcore_coff_reloc_name_lookup
00558 #define coff_relocate_section        coff_mcore_relocate_section
00559 #define coff_rtype_to_howto          coff_mcore_rtype_to_howto
00560 
00561 #define SELECT_RELOC(internal, howto) {internal.r_type = howto->type;}
00562 
00563 /* Make sure that the 'r_offset' field is copied properly
00564    so that identical binaries will compare the same.  */
00565 #define SWAP_IN_RELOC_OFFSET         H_GET_32
00566 #define SWAP_OUT_RELOC_OFFSET        H_PUT_32
00567 
00568 #define COFF_PAGE_SIZE               0x1000
00569 
00570 #include "coffcode.h"
00571 
00572 /* Forward declaration to initialise alternative_target field.  */
00573 extern const bfd_target TARGET_LITTLE_SYM;
00574 
00575 /* The transfer vectors that lead the outside world to all of the above.  */
00576 CREATE_BIG_COFF_TARGET_VEC (TARGET_BIG_SYM, TARGET_BIG_NAME, D_PAGED,
00577                          (SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_READONLY | SEC_LINK_ONCE | SEC_LINK_DUPLICATES),
00578                          0, & TARGET_LITTLE_SYM, COFF_SWAP_TABLE)
00579 CREATE_LITTLE_COFF_TARGET_VEC (TARGET_LITTLE_SYM, TARGET_LITTLE_NAME, D_PAGED,
00580                             (SEC_CODE | SEC_DATA | SEC_DEBUGGING | SEC_READONLY | SEC_LINK_ONCE | SEC_LINK_DUPLICATES),
00581                             0, & TARGET_BIG_SYM, COFF_SWAP_TABLE)