Back to index

cell-binutils  2.17cvs20070401
Functions | Variables
ldemul.c File Reference
#include "config.h"
#include "bfd.h"
#include "sysdep.h"
#include "getopt.h"
#include "bfdlink.h"
#include "ld.h"
#include "ldmisc.h"
#include "ldexp.h"
#include "ldlang.h"
#include "ldfile.h"
#include "ldemul.h"
#include "ldmain.h"
#include "ldemul-list.h"

Go to the source code of this file.

Functions

void ldemul_hll (char *name)
void ldemul_syslib (char *name)
void ldemul_after_parse (void)
void ldemul_before_parse (void)
void ldemul_after_open (void)
void ldemul_after_allocation (void)
void ldemul_before_allocation (void)
void ldemul_set_output_arch (void)
void ldemul_finish (void)
void ldemul_set_symbols (void)
void ldemul_create_output_section_statements (void)
char * ldemul_get_script (int *isfile)
bfd_boolean ldemul_open_dynamic_archive (const char *arch, search_dirs_type *search, lang_input_statement_type *entry)
bfd_boolean ldemul_place_orphan (asection *s)
void ldemul_add_options (int ns, char **shortopts, int nl, struct option **longopts, int nrl, struct option **really_longopts)
bfd_boolean ldemul_handle_option (int optc)
bfd_boolean ldemul_parse_args (int argc, char **argv)
bfd_boolean ldemul_unrecognized_file (lang_input_statement_type *entry)
bfd_boolean ldemul_recognized_file (lang_input_statement_type *entry)
char * ldemul_choose_target (int argc, char **argv)
char * ldemul_default_target (int argc ATTRIBUTE_UNUSED, char **argv ATTRIBUTE_UNUSED)
void after_parse_default (void)
void after_open_default (void)
void after_allocation_default (void)
void before_allocation_default (void)
void finish_default (void)
void set_output_arch_default (void)
void syslib_default (char *ignore ATTRIBUTE_UNUSED)
void hll_default (char *ignore ATTRIBUTE_UNUSED)
void ldemul_choose_mode (char *target)
void ldemul_list_emulations (FILE *f)
void ldemul_list_emulation_options (FILE *f)
int ldemul_find_potential_libraries (char *name, lang_input_statement_type *entry)
struct bfd_elf_version_exprldemul_new_vers_pattern (struct bfd_elf_version_expr *entry)

Variables

static ld_emulation_xfer_typeld_emulation
ld_emulation_xfer_typeld_emulations [] = { EMULATION_LIST }

Function Documentation

void after_allocation_default ( void  )

Definition at line 207 of file ldemul.c.

{
}
void after_open_default ( void  )

Definition at line 202 of file ldemul.c.

{
}
void after_parse_default ( void  )

Definition at line 197 of file ldemul.c.

{
}
void before_allocation_default ( void  )

Definition at line 212 of file ldemul.c.

{
  if (!link_info.relocatable)
    strip_excluded_output_sections ();
}

Here is the call graph for this function:

void finish_default ( void  )

Definition at line 219 of file ldemul.c.

{
  if (!link_info.relocatable)
    _bfd_fix_excluded_sec_syms (output_bfd, &link_info);
}

Here is the call graph for this function:

void hll_default ( char *ignore  ATTRIBUTE_UNUSED)

Definition at line 240 of file ldemul.c.

{
  info_msg (_("%S HLL ignored\n"));
}

Here is the call graph for this function:

void ldemul_add_options ( int  ns,
char **  shortopts,
int  nl,
struct option **  longopts,
int  nrl,
struct option **  really_longopts 
)

Definition at line 132 of file ldemul.c.

{
  if (ld_emulation->add_options)
    (*ld_emulation->add_options) (ns, shortopts, nl, longopts,
                              nrl, really_longopts);
}

Here is the caller graph for this function:

void ldemul_after_allocation ( void  )

Definition at line 71 of file ldemul.c.

Here is the caller graph for this function:

void ldemul_after_open ( void  )

Definition at line 65 of file ldemul.c.

Here is the caller graph for this function:

void ldemul_after_parse ( void  )

Definition at line 53 of file ldemul.c.

Here is the caller graph for this function:

void ldemul_before_allocation ( void  )

Definition at line 77 of file ldemul.c.

Here is the caller graph for this function:

void ldemul_before_parse ( void  )

Definition at line 59 of file ldemul.c.

Here is the caller graph for this function:

void ldemul_choose_mode ( char *  target)

Definition at line 248 of file ldemul.c.

{
  ld_emulation_xfer_type **eptr = ld_emulations;
  /* Ignore "gld" prefix.  */
  if (target[0] == 'g' && target[1] == 'l' && target[2] == 'd')
    target += 3;
  for (; *eptr; eptr++)
    {
      if (strcmp (target, (*eptr)->emulation_name) == 0)
       {
         ld_emulation = *eptr;
         return;
       }
    }
  einfo (_("%P: unrecognised emulation mode: %s\n"), target);
  einfo (_("Supported emulations: "));
  ldemul_list_emulations (stderr);
  einfo ("%F\n");
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* ldemul_choose_target ( int  argc,
char **  argv 
)

Definition at line 179 of file ldemul.c.

{
  return ld_emulation->choose_target (argc, argv);
}

Here is the caller graph for this function:

Definition at line 102 of file ldemul.c.

Here is the caller graph for this function:

char* ldemul_default_target ( int argc  ATTRIBUTE_UNUSED,
char **argv  ATTRIBUTE_UNUSED 
)

Definition at line 188 of file ldemul.c.

{
  char *from_outside = getenv (TARGET_ENVIRON);
  if (from_outside != (char *) NULL)
    return from_outside;
  return ld_emulation->target_name;
}

Here is the call graph for this function:

Definition at line 309 of file ldemul.c.

Here is the caller graph for this function:

void ldemul_finish ( void  )

Definition at line 89 of file ldemul.c.

Here is the caller graph for this function:

char* ldemul_get_script ( int isfile)

Definition at line 109 of file ldemul.c.

{
  return ld_emulation->get_script (isfile);
}

Here is the caller graph for this function:

Definition at line 142 of file ldemul.c.

{
  if (ld_emulation->handle_option)
    return (*ld_emulation->handle_option) (optc);
  return FALSE;
}

Here is the caller graph for this function:

void ldemul_hll ( char *  name)

Definition at line 41 of file ldemul.c.

void ldemul_list_emulation_options ( FILE *  f)

Definition at line 285 of file ldemul.c.

{
  ld_emulation_xfer_type **eptr;
  int options_found = 0;

  for (eptr = ld_emulations; *eptr; eptr++)
    {
      ld_emulation_xfer_type *emul = *eptr;

      if (emul->list_options)
       {
         fprintf (f, "%s: \n", emul->emulation_name);

         emul->list_options (f);

         options_found = 1;
       }
    }

  if (! options_found)
    fprintf (f, _("  no emulation specific options.\n"));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void ldemul_list_emulations ( FILE *  f)

Definition at line 269 of file ldemul.c.

{
  ld_emulation_xfer_type **eptr = ld_emulations;
  bfd_boolean first = TRUE;

  for (; *eptr; eptr++)
    {
      if (first)
       first = FALSE;
      else
       fprintf (f, " ");
      fprintf (f, "%s", (*eptr)->emulation_name);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 318 of file ldemul.c.

{
  if (ld_emulation->new_vers_pattern)
    entry = (*ld_emulation->new_vers_pattern) (entry);
  return entry;
}

Here is the caller graph for this function:

Definition at line 115 of file ldemul.c.

{
  if (ld_emulation->open_dynamic_archive)
    return (*ld_emulation->open_dynamic_archive) (arch, search, entry);
  return FALSE;
}

Here is the caller graph for this function:

bfd_boolean ldemul_parse_args ( int  argc,
char **  argv 
)

Definition at line 150 of file ldemul.c.

{
  /* Try and use the emulation parser if there is one.  */
  if (ld_emulation->parse_args)
    return (*ld_emulation->parse_args) (argc, argv);
  return FALSE;
}

Here is the caller graph for this function:

Definition at line 124 of file ldemul.c.

{
  if (ld_emulation->place_orphan)
    return (*ld_emulation->place_orphan) (s);
  return FALSE;
}

Here is the caller graph for this function:

Definition at line 171 of file ldemul.c.

{
  if (ld_emulation->recognized_file)
    return (*ld_emulation->recognized_file) (entry);
  return FALSE;
}

Here is the caller graph for this function:

void ldemul_set_output_arch ( void  )

Definition at line 83 of file ldemul.c.

Here is the caller graph for this function:

void ldemul_set_symbols ( void  )

Definition at line 95 of file ldemul.c.

Here is the caller graph for this function:

void ldemul_syslib ( char *  name)

Definition at line 47 of file ldemul.c.

Definition at line 161 of file ldemul.c.

{
  if (ld_emulation->unrecognized_file)
    return (*ld_emulation->unrecognized_file) (entry);
  return FALSE;
}

Here is the caller graph for this function:

void set_output_arch_default ( void  )

Definition at line 226 of file ldemul.c.

{
  /* Set the output architecture and machine if possible.  */
  bfd_set_arch_mach (output_bfd,
                   ldfile_output_architecture, ldfile_output_machine);
}
void syslib_default ( char *ignore  ATTRIBUTE_UNUSED)

Definition at line 234 of file ldemul.c.

{
  info_msg (_("%S SYSLIB ignored\n"));
}

Here is the call graph for this function:


Variable Documentation

Definition at line 38 of file ldemul.c.

ld_emulation_xfer_type* ld_emulations[] = { EMULATION_LIST }

Definition at line 245 of file ldemul.c.