OpenCores
URL https://opencores.org/ocsvn/openrisc_me/openrisc_me/trunk

Subversion Repositories openrisc_me

[/] [openrisc/] [trunk/] [gnu-src/] [binutils-2.18.50/] [ld/] [ldemul.h] - Diff between revs 38 and 156

Go to most recent revision | Only display areas with differences | Details | Blame | View Log

Rev 38 Rev 156
/* ld-emul.h - Linker emulation header file
/* ld-emul.h - Linker emulation header file
   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2001,
   2002, 2003, 2004, 2005, 2007
   2002, 2003, 2004, 2005, 2007
   Free Software Foundation, Inc.
   Free Software Foundation, Inc.
 
 
   This file is part of the GNU Binutils.
   This file is part of the GNU Binutils.
 
 
   This program is free software; you can redistribute it and/or modify
   This program is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 3 of the License, or
   the Free Software Foundation; either version 3 of the License, or
   (at your option) any later version.
   (at your option) any later version.
 
 
   This program is distributed in the hope that it will be useful,
   This program is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.
   GNU General Public License for more details.
 
 
   You should have received a copy of the GNU General Public License
   You should have received a copy of the GNU General Public License
   along with this program; if not, write to the Free Software
   along with this program; if not, write to the Free Software
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
   Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston,
   MA 02110-1301, USA.  */
   MA 02110-1301, USA.  */
 
 
#ifndef LDEMUL_H
#ifndef LDEMUL_H
#define LDEMUL_H
#define LDEMUL_H
 
 
/* Forward declaration for ldemul_add_options() and others.  */
/* Forward declaration for ldemul_add_options() and others.  */
struct option;
struct option;
 
 
extern void ldemul_hll
extern void ldemul_hll
  (char *);
  (char *);
extern void ldemul_syslib
extern void ldemul_syslib
  (char *);
  (char *);
extern void ldemul_after_parse
extern void ldemul_after_parse
  (void);
  (void);
extern void ldemul_before_parse
extern void ldemul_before_parse
  (void);
  (void);
extern void ldemul_after_open
extern void ldemul_after_open
  (void);
  (void);
extern void ldemul_after_allocation
extern void ldemul_after_allocation
  (void);
  (void);
extern void ldemul_before_allocation
extern void ldemul_before_allocation
  (void);
  (void);
extern void ldemul_set_output_arch
extern void ldemul_set_output_arch
  (void);
  (void);
extern char *ldemul_choose_target
extern char *ldemul_choose_target
  (int, char**);
  (int, char**);
extern void ldemul_choose_mode
extern void ldemul_choose_mode
  (char *);
  (char *);
extern void ldemul_list_emulations
extern void ldemul_list_emulations
  (FILE *);
  (FILE *);
extern void ldemul_list_emulation_options
extern void ldemul_list_emulation_options
  (FILE *);
  (FILE *);
extern char *ldemul_get_script
extern char *ldemul_get_script
  (int *isfile);
  (int *isfile);
extern void ldemul_finish
extern void ldemul_finish
  (void);
  (void);
extern void ldemul_set_symbols
extern void ldemul_set_symbols
  (void);
  (void);
extern void ldemul_create_output_section_statements
extern void ldemul_create_output_section_statements
  (void);
  (void);
extern bfd_boolean ldemul_place_orphan
extern bfd_boolean ldemul_place_orphan
  (asection *);
  (asection *);
extern bfd_boolean ldemul_parse_args
extern bfd_boolean ldemul_parse_args
  (int, char **);
  (int, char **);
extern void ldemul_add_options
extern void ldemul_add_options
  (int, char **, int, struct option **, int, struct option **);
  (int, char **, int, struct option **, int, struct option **);
extern bfd_boolean ldemul_handle_option
extern bfd_boolean ldemul_handle_option
  (int);
  (int);
extern bfd_boolean ldemul_unrecognized_file
extern bfd_boolean ldemul_unrecognized_file
  (struct lang_input_statement_struct *);
  (struct lang_input_statement_struct *);
extern bfd_boolean ldemul_recognized_file
extern bfd_boolean ldemul_recognized_file
  (struct lang_input_statement_struct *);
  (struct lang_input_statement_struct *);
extern bfd_boolean ldemul_open_dynamic_archive
extern bfd_boolean ldemul_open_dynamic_archive
  (const char *, struct search_dirs *, struct lang_input_statement_struct *);
  (const char *, struct search_dirs *, struct lang_input_statement_struct *);
extern char *ldemul_default_target
extern char *ldemul_default_target
  (int, char**);
  (int, char**);
extern void after_parse_default
extern void after_parse_default
  (void);
  (void);
extern void after_open_default
extern void after_open_default
  (void);
  (void);
extern void after_allocation_default
extern void after_allocation_default
  (void);
  (void);
extern void before_allocation_default
extern void before_allocation_default
  (void);
  (void);
extern void finish_default
extern void finish_default
  (void);
  (void);
extern void finish_default
extern void finish_default
  (void);
  (void);
extern void set_output_arch_default
extern void set_output_arch_default
  (void);
  (void);
extern void syslib_default
extern void syslib_default
  (char*);
  (char*);
extern void hll_default
extern void hll_default
  (char*);
  (char*);
extern int  ldemul_find_potential_libraries
extern int  ldemul_find_potential_libraries
  (char *, struct lang_input_statement_struct *);
  (char *, struct lang_input_statement_struct *);
extern struct bfd_elf_version_expr *ldemul_new_vers_pattern
extern struct bfd_elf_version_expr *ldemul_new_vers_pattern
  (struct bfd_elf_version_expr *);
  (struct bfd_elf_version_expr *);
 
 
typedef struct ld_emulation_xfer_struct {
typedef struct ld_emulation_xfer_struct {
  /* Run before parsing the command line and script file.
  /* Run before parsing the command line and script file.
     Set the architecture, maybe other things.  */
     Set the architecture, maybe other things.  */
  void   (*before_parse) (void);
  void   (*before_parse) (void);
 
 
  /* Handle the SYSLIB (low level library) script command.  */
  /* Handle the SYSLIB (low level library) script command.  */
  void   (*syslib) (char *);
  void   (*syslib) (char *);
 
 
  /* Handle the HLL (high level library) script command.  */
  /* Handle the HLL (high level library) script command.  */
  void   (*hll) (char *);
  void   (*hll) (char *);
 
 
  /* Run after parsing the command line and script file.  */
  /* Run after parsing the command line and script file.  */
  void   (*after_parse) (void);
  void   (*after_parse) (void);
 
 
  /* Run after opening all input files, and loading the symbols.  */
  /* Run after opening all input files, and loading the symbols.  */
  void   (*after_open) (void);
  void   (*after_open) (void);
 
 
  /* Run after allocating output sections.  */
  /* Run after allocating output sections.  */
  void   (*after_allocation)  (void);
  void   (*after_allocation)  (void);
 
 
  /* Set the output architecture and machine if possible.  */
  /* Set the output architecture and machine if possible.  */
  void   (*set_output_arch) (void);
  void   (*set_output_arch) (void);
 
 
  /* Decide which target name to use.  */
  /* Decide which target name to use.  */
  char * (*choose_target) (int, char**);
  char * (*choose_target) (int, char**);
 
 
  /* Run before allocating output sections.  */
  /* Run before allocating output sections.  */
  void   (*before_allocation) (void);
  void   (*before_allocation) (void);
 
 
  /* Return the appropriate linker script.  */
  /* Return the appropriate linker script.  */
  char * (*get_script) (int *isfile);
  char * (*get_script) (int *isfile);
 
 
  /* The name of this emulation.  */
  /* The name of this emulation.  */
  char *emulation_name;
  char *emulation_name;
 
 
  /* The output format.  */
  /* The output format.  */
  char *target_name;
  char *target_name;
 
 
  /* Run after assigning values from the script.  */
  /* Run after assigning values from the script.  */
  void  (*finish) (void);
  void  (*finish) (void);
 
 
  /* Create any output sections needed by the target.  */
  /* Create any output sections needed by the target.  */
  void  (*create_output_section_statements) (void);
  void  (*create_output_section_statements) (void);
 
 
  /* Try to open a dynamic library.  ARCH is an architecture name, and
  /* Try to open a dynamic library.  ARCH is an architecture name, and
     is normally the empty string.  ENTRY is the lang_input_statement
     is normally the empty string.  ENTRY is the lang_input_statement
     that should be opened.  */
     that should be opened.  */
  bfd_boolean (*open_dynamic_archive)
  bfd_boolean (*open_dynamic_archive)
    (const char *arch, struct search_dirs *,
    (const char *arch, struct search_dirs *,
     struct lang_input_statement_struct *entry);
     struct lang_input_statement_struct *entry);
 
 
  /* Place an orphan section.  Return TRUE if it was placed, FALSE if
  /* Place an orphan section.  Return TRUE if it was placed, FALSE if
     the default action should be taken.  This field may be NULL, in
     the default action should be taken.  This field may be NULL, in
     which case the default action will always be taken.  */
     which case the default action will always be taken.  */
  bfd_boolean (*place_orphan)
  bfd_boolean (*place_orphan)
    (asection *);
    (asection *);
 
 
  /* Run after assigning parsing with the args, but before
  /* Run after assigning parsing with the args, but before
     reading the script.  Used to initialize symbols used in the script.  */
     reading the script.  Used to initialize symbols used in the script.  */
  void  (*set_symbols) (void);
  void  (*set_symbols) (void);
 
 
  /* Parse args which the base linker doesn't understand.
  /* Parse args which the base linker doesn't understand.
     Return TRUE if the arg needs no further processing.  */
     Return TRUE if the arg needs no further processing.  */
  bfd_boolean (*parse_args) (int, char **);
  bfd_boolean (*parse_args) (int, char **);
 
 
  /* Hook to add options to parameters passed by the base linker to
  /* Hook to add options to parameters passed by the base linker to
     getopt_long and getopt_long_only calls.  */
     getopt_long and getopt_long_only calls.  */
  void (*add_options)
  void (*add_options)
    (int, char **, int, struct option **, int, struct option **);
    (int, char **, int, struct option **, int, struct option **);
 
 
  /* Companion to the above to handle an option.  Returns TRUE if it is
  /* Companion to the above to handle an option.  Returns TRUE if it is
     one of our options.  */
     one of our options.  */
  bfd_boolean (*handle_option) (int);
  bfd_boolean (*handle_option) (int);
 
 
  /* Run to handle files which are not recognized as object files or
  /* Run to handle files which are not recognized as object files or
     archives.  Return TRUE if the file was handled.  */
     archives.  Return TRUE if the file was handled.  */
  bfd_boolean (*unrecognized_file)
  bfd_boolean (*unrecognized_file)
    (struct lang_input_statement_struct *);
    (struct lang_input_statement_struct *);
 
 
  /* Run to list the command line options which parse_args handles.  */
  /* Run to list the command line options which parse_args handles.  */
  void (* list_options) (FILE *);
  void (* list_options) (FILE *);
 
 
  /* Run to specially handle files which *are* recognized as object
  /* Run to specially handle files which *are* recognized as object
     files or archives.  Return TRUE if the file was handled.  */
     files or archives.  Return TRUE if the file was handled.  */
  bfd_boolean (*recognized_file)
  bfd_boolean (*recognized_file)
    (struct lang_input_statement_struct *);
    (struct lang_input_statement_struct *);
 
 
  /* Called when looking for libraries in a directory specified
  /* Called when looking for libraries in a directory specified
     via a linker command line option or linker script option.
     via a linker command line option or linker script option.
     Files that match the pattern "lib*.a" have already been scanned.
     Files that match the pattern "lib*.a" have already been scanned.
     (For VMS files matching ":lib*.a" have also been scanned).  */
     (For VMS files matching ":lib*.a" have also been scanned).  */
  int (* find_potential_libraries)
  int (* find_potential_libraries)
    (char *, struct lang_input_statement_struct *);
    (char *, struct lang_input_statement_struct *);
 
 
  /* Called when adding a new version pattern.  PowerPC64-ELF uses
  /* Called when adding a new version pattern.  PowerPC64-ELF uses
     this hook to add a pattern matching ".foo" for every "foo".  */
     this hook to add a pattern matching ".foo" for every "foo".  */
  struct bfd_elf_version_expr * (*new_vers_pattern)
  struct bfd_elf_version_expr * (*new_vers_pattern)
    (struct bfd_elf_version_expr *);
    (struct bfd_elf_version_expr *);
 
 
} ld_emulation_xfer_type;
} ld_emulation_xfer_type;
 
 
typedef enum {
typedef enum {
  intel_ic960_ld_mode_enum,
  intel_ic960_ld_mode_enum,
  default_mode_enum,
  default_mode_enum,
  intel_gld960_ld_mode_enum
  intel_gld960_ld_mode_enum
} lang_emulation_mode_enum_type;
} lang_emulation_mode_enum_type;
 
 
extern ld_emulation_xfer_type *ld_emulations[];
extern ld_emulation_xfer_type *ld_emulations[];
 
 
#endif
#endif
 
 

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.