Back to index

cell-binutils  2.17cvs20070401
Classes | Functions | Variables
targets.c File Reference
#include "bfd.h"
#include "sysdep.h"
#include "libbfd.h"
#include "fnmatch.h"
#include "targmatch.h"

Go to the source code of this file.


struct  targmatch


static const bfd_targetfind_target (const char *name)
bfd_boolean bfd_set_default_target (const char *name)
const bfd_targetbfd_find_target (const char *target_name, bfd *abfd)
const char ** bfd_target_list (void)
const bfd_targetbfd_search_for_target (int(*search_func)(const bfd_target *, void *), void *data)


const bfd_target a_out_adobe_vec
const bfd_target aix5coff64_vec
const bfd_target aout0_big_vec
const bfd_target aout_arm_big_vec
const bfd_target aout_arm_little_vec
const bfd_target aout_mips_big_vec
const bfd_target aout_mips_little_vec
const bfd_target apollocoff_vec
const bfd_target arm_epoc_pe_big_vec
const bfd_target arm_epoc_pe_little_vec
const bfd_target arm_epoc_pei_big_vec
const bfd_target arm_epoc_pei_little_vec
const bfd_target arm_wince_pe_big_vec
const bfd_target arm_wince_pe_little_vec
const bfd_target arm_wince_pei_big_vec
const bfd_target arm_wince_pei_little_vec
const bfd_target armcoff_big_vec
const bfd_target armcoff_little_vec
const bfd_target armnetbsd_vec
const bfd_target armpe_big_vec
const bfd_target armpe_little_vec
const bfd_target armpei_big_vec
const bfd_target armpei_little_vec
const bfd_target b_out_vec_big_host
const bfd_target b_out_vec_little_host
const bfd_target bfd_efi_app_ia32_vec
const bfd_target bfd_efi_app_x86_64_vec
const bfd_target bfd_efi_app_ia64_vec
const bfd_target bfd_elf32_avr_vec
const bfd_target bfd_elf32_bfin_vec
const bfd_target bfd_elf32_bfinfdpic_vec
const bfd_target bfd_elf32_big_generic_vec
const bfd_target bfd_elf32_bigarc_vec
const bfd_target bfd_elf32_bigarm_vec
const bfd_target bfd_elf32_bigarm_symbian_vec
const bfd_target bfd_elf32_bigarm_vxworks_vec
const bfd_target bfd_elf32_bigmips_vec
const bfd_target bfd_elf32_bigmips_vxworks_vec
const bfd_target bfd_elf32_cr16c_vec
const bfd_target bfd_elf32_cris_vec
const bfd_target bfd_elf32_crx_vec
const bfd_target bfd_elf32_d10v_vec
const bfd_target bfd_elf32_d30v_vec
const bfd_target bfd_elf32_dlx_big_vec
const bfd_target bfd_elf32_fr30_vec
const bfd_target bfd_elf32_frv_vec
const bfd_target bfd_elf32_frvfdpic_vec
const bfd_target bfd_elf32_h8300_vec
const bfd_target bfd_elf32_hppa_linux_vec
const bfd_target bfd_elf32_hppa_nbsd_vec
const bfd_target bfd_elf32_hppa_vec
const bfd_target bfd_elf32_i370_vec
const bfd_target bfd_elf32_i386_freebsd_vec
const bfd_target bfd_elf32_i386_vxworks_vec
const bfd_target bfd_elf32_i386_vec
const bfd_target bfd_elf32_i860_little_vec
const bfd_target bfd_elf32_i860_vec
const bfd_target bfd_elf32_i960_vec
const bfd_target bfd_elf32_ia64_big_vec
const bfd_target bfd_elf32_ia64_hpux_big_vec
const bfd_target bfd_elf32_ip2k_vec
const bfd_target bfd_elf32_iq2000_vec
const bfd_target bfd_elf32_little_generic_vec
const bfd_target bfd_elf32_littlearc_vec
const bfd_target bfd_elf32_littlearm_vec
const bfd_target bfd_elf32_littlearm_symbian_vec
const bfd_target bfd_elf32_littlearm_vxworks_vec
const bfd_target bfd_elf32_littlemips_vec
const bfd_target bfd_elf32_littlemips_vxworks_vec
const bfd_target bfd_elf32_m32c_vec
const bfd_target bfd_elf32_m32r_vec
const bfd_target bfd_elf32_m32rle_vec
const bfd_target bfd_elf32_m32rlin_vec
const bfd_target bfd_elf32_m32rlelin_vec
const bfd_target bfd_elf32_m68hc11_vec
const bfd_target bfd_elf32_m68hc12_vec
const bfd_target bfd_elf32_m68k_vec
const bfd_target bfd_elf32_m88k_vec
const bfd_target bfd_elf32_mcore_big_vec
const bfd_target bfd_elf32_mcore_little_vec
const bfd_target bfd_elf32_mep_vec
const bfd_target bfd_elf32_mep_little_vec
const bfd_target bfd_elf32_mn10200_vec
const bfd_target bfd_elf32_mn10300_vec
const bfd_target bfd_elf32_mt_vec
const bfd_target bfd_elf32_msp430_vec
const bfd_target bfd_elf32_nbigmips_vec
const bfd_target bfd_elf32_nlittlemips_vec
const bfd_target bfd_elf32_ntradbigmips_vec
const bfd_target bfd_elf32_ntradlittlemips_vec
const bfd_target bfd_elf32_openrisc_vec
const bfd_target bfd_elf32_or32_big_vec
const bfd_target bfd_elf32_pj_vec
const bfd_target bfd_elf32_pjl_vec
const bfd_target bfd_elf32_powerpc_vec
const bfd_target bfd_elf32_powerpcle_vec
const bfd_target bfd_elf32_powerpc_vxworks_vec
const bfd_target bfd_elf32_s390_vec
const bfd_target bfd_elf32_bigscore_vec
const bfd_target bfd_elf32_littlescore_vec
const bfd_target bfd_elf32_sh64_vec
const bfd_target bfd_elf32_sh64l_vec
const bfd_target bfd_elf32_sh64lin_vec
const bfd_target bfd_elf32_sh64blin_vec
const bfd_target bfd_elf32_sh64lnbsd_vec
const bfd_target bfd_elf32_sh64nbsd_vec
const bfd_target bfd_elf32_sh_vec
const bfd_target bfd_elf32_shblin_vec
const bfd_target bfd_elf32_shl_vec
const bfd_target bfd_elf32_shl_symbian_vec
const bfd_target bfd_elf32_shlin_vec
const bfd_target bfd_elf32_shlnbsd_vec
const bfd_target bfd_elf32_shlvxworks_vec
const bfd_target bfd_elf32_shnbsd_vec
const bfd_target bfd_elf32_shvxworks_vec
const bfd_target bfd_elf32_sparc_vec
const bfd_target bfd_elf32_sparc_vxworks_vec
const bfd_target bfd_elf32_spu_vec
const bfd_target bfd_elf32_tradbigmips_vec
const bfd_target bfd_elf32_tradlittlemips_vec
const bfd_target bfd_elf32_us_cris_vec
const bfd_target bfd_elf32_v850_vec
const bfd_target bfd_elf32_vax_vec
const bfd_target bfd_elf32_xc16x_vec
const bfd_target bfd_elf32_xstormy16_vec
const bfd_target bfd_elf32_xtensa_be_vec
const bfd_target bfd_elf32_xtensa_le_vec
const bfd_target bfd_elf64_alpha_freebsd_vec
const bfd_target bfd_elf64_alpha_vec
const bfd_target bfd_elf64_big_generic_vec
const bfd_target bfd_elf64_bigmips_vec
const bfd_target bfd_elf64_hppa_linux_vec
const bfd_target bfd_elf64_hppa_vec
const bfd_target bfd_elf64_ia64_big_vec
const bfd_target bfd_elf64_ia64_hpux_big_vec
const bfd_target bfd_elf64_ia64_little_vec
const bfd_target bfd_elf64_little_generic_vec
const bfd_target bfd_elf64_littlemips_vec
const bfd_target bfd_elf64_mmix_vec
const bfd_target bfd_elf64_powerpc_vec
const bfd_target bfd_elf64_powerpcle_vec
const bfd_target bfd_elf64_s390_vec
const bfd_target bfd_elf64_sh64_vec
const bfd_target bfd_elf64_sh64l_vec
const bfd_target bfd_elf64_sh64lin_vec
const bfd_target bfd_elf64_sh64blin_vec
const bfd_target bfd_elf64_sh64lnbsd_vec
const bfd_target bfd_elf64_sh64nbsd_vec
const bfd_target bfd_elf64_sparc_vec
const bfd_target bfd_elf64_sparc_freebsd_vec
const bfd_target bfd_elf64_tradbigmips_vec
const bfd_target bfd_elf64_tradlittlemips_vec
const bfd_target bfd_elf64_x86_64_freebsd_vec
const bfd_target bfd_elf64_x86_64_vec
const bfd_target bfd_mmo_vec
const bfd_target bfd_powerpc_pe_vec
const bfd_target bfd_powerpc_pei_vec
const bfd_target bfd_powerpcle_pe_vec
const bfd_target bfd_powerpcle_pei_vec
const bfd_target cris_aout_vec
const bfd_target demo_64_vec
const bfd_target ecoff_big_vec
const bfd_target ecoff_biglittle_vec
const bfd_target ecoff_little_vec
const bfd_target ecoffalpha_little_vec
const bfd_target go32coff_vec
const bfd_target go32stubbedcoff_vec
const bfd_target h8300coff_vec
const bfd_target h8500coff_vec
const bfd_target host_aout_vec
const bfd_target hp300bsd_vec
const bfd_target hp300hpux_vec
const bfd_target i386aout_vec
const bfd_target i386bsd_vec
const bfd_target i386coff_vec
const bfd_target i386dynix_vec
const bfd_target i386freebsd_vec
const bfd_target i386linux_vec
const bfd_target i386lynx_aout_vec
const bfd_target i386lynx_coff_vec
const bfd_target i386mach3_vec
const bfd_target i386msdos_vec
const bfd_target i386netbsd_vec
const bfd_target i386os9k_vec
const bfd_target i386pe_vec
const bfd_target i386pei_vec
const bfd_target i860coff_vec
const bfd_target icoff_big_vec
const bfd_target icoff_little_vec
const bfd_target ieee_vec
const bfd_target m68k4knetbsd_vec
const bfd_target m68kaux_coff_vec
const bfd_target m68kcoff_vec
const bfd_target m68kcoffun_vec
const bfd_target m68klinux_vec
const bfd_target m68knetbsd_vec
const bfd_target m68ksysvcoff_vec
const bfd_target m88kbcs_vec
const bfd_target m88kmach3_vec
const bfd_target m88kopenbsd_vec
const bfd_target mach_o_be_vec
const bfd_target mach_o_le_vec
const bfd_target mach_o_fat_vec
const bfd_target maxqcoff_vec
const bfd_target mcore_pe_big_vec
const bfd_target mcore_pe_little_vec
const bfd_target mcore_pei_big_vec
const bfd_target mcore_pei_little_vec
const bfd_target mipslpe_vec
const bfd_target mipslpei_vec
const bfd_target newsos3_vec
const bfd_target nlm32_alpha_vec
const bfd_target nlm32_i386_vec
const bfd_target nlm32_powerpc_vec
const bfd_target nlm32_sparc_vec
const bfd_target oasys_vec
const bfd_target or32coff_big_vec
const bfd_target pc532machaout_vec
const bfd_target pc532netbsd_vec
const bfd_target pdp11_aout_vec
const bfd_target pef_vec
const bfd_target pef_xlib_vec
const bfd_target pmac_xcoff_vec
const bfd_target ppcboot_vec
const bfd_target riscix_vec
const bfd_target rs6000coff64_vec
const bfd_target rs6000coff_vec
const bfd_target shcoff_small_vec
const bfd_target shcoff_vec
const bfd_target shlcoff_small_vec
const bfd_target shlcoff_vec
const bfd_target shlpe_vec
const bfd_target shlpei_vec
const bfd_target som_vec
const bfd_target sparccoff_vec
const bfd_target sparcle_aout_vec
const bfd_target sparclinux_vec
const bfd_target sparclynx_aout_vec
const bfd_target sparclynx_coff_vec
const bfd_target sparcnetbsd_vec
const bfd_target sunos_big_vec
const bfd_target sym_vec
const bfd_target tic30_aout_vec
const bfd_target tic30_coff_vec
const bfd_target tic4x_coff0_beh_vec
const bfd_target tic4x_coff0_vec
const bfd_target tic4x_coff1_beh_vec
const bfd_target tic4x_coff1_vec
const bfd_target tic4x_coff2_beh_vec
const bfd_target tic4x_coff2_vec
const bfd_target tic54x_coff0_beh_vec
const bfd_target tic54x_coff0_vec
const bfd_target tic54x_coff1_beh_vec
const bfd_target tic54x_coff1_vec
const bfd_target tic54x_coff2_beh_vec
const bfd_target tic54x_coff2_vec
const bfd_target tic80coff_vec
const bfd_target vaxbsd_vec
const bfd_target vaxnetbsd_vec
const bfd_target vax1knetbsd_vec
const bfd_target versados_vec
const bfd_target vms_alpha_vec
const bfd_target vms_vax_vec
const bfd_target w65_vec
const bfd_target we32kcoff_vec
const bfd_target x86_64pe_vec
const bfd_target x86_64pei_vec
const bfd_target x86_64coff_vec
const bfd_target z80coff_vec
const bfd_target z8kcoff_vec
const bfd_target srec_vec
const bfd_target symbolsrec_vec
const bfd_target tekhex_vec
const bfd_target binary_vec
const bfd_target ihex_vec
const bfd_target aix386_core_vec
const bfd_target cisco_core_big_vec
const bfd_target cisco_core_little_vec
const bfd_target hppabsd_core_vec
const bfd_target hpux_core_vec
const bfd_target irix_core_vec
const bfd_target netbsd_core_vec
const bfd_target osf_core_vec
const bfd_target ptrace_core_vec
const bfd_target sco5_core_vec
const bfd_target trad_core_vec
const bfd_target bfd_elf32_am33lin_vec
static const bfd_target *const _bfd_target_vector []
const bfd_target *constbfd_target_vector = _bfd_target_vector
const bfd_targetbfd_default_vector []
static const bfd_target_bfd_associated_vector []
const bfd_target *constbfd_associated_vector = _bfd_associated_vector
const size_t _bfd_target_vector_entries = sizeof (_bfd_target_vector)/sizeof (*_bfd_target_vector)
static struct targmatch []

Class Documentation

struct targmatch

Definition at line 1265 of file targets.c.

Collaboration diagram for targmatch:
Class Members
const char * triplet
const bfd_target * vector

Function Documentation

const bfd_target* bfd_find_target ( const char *  target_name,
bfd abfd 

Definition at line 1361 of file targets.c.

  const char *targname;
  const bfd_target *target;

  if (target_name != NULL)
    targname = target_name;
    targname = getenv ("GNUTARGET");

  /* This is safe; the vector cannot be null.  */
  if (targname == NULL || strcmp (targname, "default") == 0)
      if (bfd_default_vector[0] != NULL)
       target = bfd_default_vector[0];
       target = bfd_target_vector[0];
      if (abfd)
         abfd->xvec = target;
         abfd->target_defaulted = TRUE;
      return target;

  if (abfd)
    abfd->target_defaulted = FALSE;

  target = find_target (targname);
  if (target == NULL)
    return NULL;

  if (abfd)
    abfd->xvec = target;
  return target;

Here is the call graph for this function:

Here is the caller graph for this function:

const bfd_target* bfd_search_for_target ( int(*)(const bfd_target *, void *)  search_func,
void *  data 

Definition at line 1461 of file targets.c.

  const bfd_target * const *target;

  for (target = bfd_target_vector; *target != NULL; target ++)
    if (search_func (*target, data))
      return *target;

  return NULL;

Here is the caller graph for this function:

Definition at line 1324 of file targets.c.

  const bfd_target *target;

  if (bfd_default_vector[0] != NULL
      && strcmp (name, bfd_default_vector[0]->name) == 0)
    return TRUE;

  target = find_target (name);
  if (target == NULL)
    return FALSE;

  bfd_default_vector[0] = target;
  return TRUE;

Here is the call graph for this function:

Here is the caller graph for this function:

const char** bfd_target_list ( void  )

Definition at line 1413 of file targets.c.

  int vec_length = 0;
  bfd_size_type amt;
#if defined (HOST_HPPAHPUX) && ! defined (__STDC__)
  /* The native compiler on the HP9000/700 has a bug which causes it
     to loop endlessly when compiling this file.  This avoids it.  */
  const bfd_target * const *target;
  const  char **name_list, **name_ptr;

  for (target = &bfd_target_vector[0]; *target != NULL; target++)

  amt = (vec_length + 1) * sizeof (char **);
  name_ptr = name_list = bfd_malloc (amt);

  if (name_list == NULL)
    return NULL;

  for (target = &bfd_target_vector[0]; *target != NULL; target++)
    if (target == &bfd_target_vector[0]
       || *target != bfd_target_vector[0])
      *name_ptr++ = (*target)->name;

  *name_ptr = NULL;
  return name_list;

Here is the call graph for this function:

Here is the caller graph for this function:

static const bfd_target* find_target ( const char *  name) [static]

Definition at line 1284 of file targets.c.

  const bfd_target * const *target;
  const struct targmatch *match;

  for (target = &bfd_target_vector[0]; *target != NULL; target++)
    if (strcmp (name, (*target)->name) == 0)
      return *target;

  /* If we couldn't match on the exact name, try matching on the
     configuration triplet.  FIXME: We should run the triplet through
     config.sub first, but that is hard.  */
  for (match = &bfd_target_match[0]; match->triplet != NULL; match++)
      if (fnmatch (match->triplet, name, 0) == 0)
         while (match->vector == NULL)
         return match->vector;

  bfd_set_error (bfd_error_invalid_target);
  return NULL;

Here is the call graph for this function:

Here is the caller graph for this function:

Variable Documentation

Initial value:


Definition at line 1250 of file targets.c.

Definition at line 829 of file targets.c.

Definition at line 1261 of file targets.c.

Definition at line 229 of file aix386-core.c.

Definition at line 2885 of file coff64-rs6000.c.

Definition at line 467 of file aout-arm.c.

Definition at line 415 of file mipsbsd.c.

Definition at line 1395 of file bout.c.

Definition at line 1256 of file targets.c.

Initial value:


Definition at line 1240 of file targets.c.

Definition at line 3222 of file mmo.c.

Definition at line 1235 of file targets.c.

Definition at line 326 of file binary.c.

Definition at line 323 of file cisco-core.c.

Definition at line 1507 of file coff-mips.c.

Definition at line 1420 of file coff-mips.c.

Definition at line 2400 of file coff-alpha.c.

Definition at line 378 of file hpux-core.c.

Definition at line 628 of file coff-i386.c.

Definition at line 175 of file i386msdos.c.

Definition at line 182 of file i386os9k.c.

Definition at line 654 of file coff-i860.c.

Definition at line 943 of file ihex.c.

Definition at line 859 of file pe-mips.c.

Definition at line 268 of file netbsd-core.c.

Definition at line 574 of file coff-or32.c.

Definition at line 188 of file osf-core.c.

Definition at line 1004 of file pef.c.

Definition at line 1156 of file pef.c.

Definition at line 4336 of file coff-rs6000.c.

Definition at line 489 of file ppcboot.c.

Definition at line 2633 of file coff64-rs6000.c.

Definition at line 4085 of file coff-rs6000.c.

Definition at line 360 of file sco5-core.c.

Definition at line 3165 of file coff-sh.c.

Definition at line 1212 of file srec.c.

Definition at line 2302 of file xsym.c.

Definition at line 1267 of file srec.c.

struct targmatch[] [static]
Initial value:

  { NULL, NULL }

Definition at line 1276 of file targets.c.

Definition at line 950 of file tekhex.c.

Definition at line 1057 of file aout-tic30.c.

Definition at line 187 of file coff-tic30.c.

Definition at line 473 of file coff-tic54x.c.

Definition at line 429 of file coff-tic54x.c.

Definition at line 563 of file coff-tic54x.c.

Definition at line 518 of file coff-tic54x.c.

Definition at line 653 of file coff-tic54x.c.

Definition at line 608 of file coff-tic54x.c.

Definition at line 271 of file trad-core.c.

Definition at line 817 of file versados.c.

Definition at line 1600 of file vms.c.

Definition at line 1644 of file vms.c.

Definition at line 725 of file coff-x86_64.c.