top level:
[deliverable/binutils-gdb.git] / ld / ld.h
diff --git a/ld/ld.h b/ld/ld.h
index c2337b6a1e981d74109a3ee7d2e4386e0b8a3be1..51a291412f5725e071a33d3e0f3718c561c8289e 100644 (file)
--- a/ld/ld.h
+++ b/ld/ld.h
@@ -1,5 +1,6 @@
 /* ld.h -- general linker header file
 /* ld.h -- general linker header file
-   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2004
+   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+   2001, 2002, 2003, 2004, 2005, 2006, 2007
    Free Software Foundation, Inc.
 
    This file is part of GLD, the Gnu Linker.
    Free Software Foundation, Inc.
 
    This file is part of GLD, the Gnu Linker.
 
    You should have received a copy of the GNU General Public License
    along with GLD; see the file COPYING.  If not, write to the Free
 
    You should have received a copy of the GNU General Public License
    along with GLD; see the file COPYING.  If not, write to the Free
-   Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA.  */
+   Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
+   02110-1301, USA.  */
 
 #ifndef LD_H
 #define LD_H
 
 #ifdef HAVE_LOCALE_H
 
 #ifndef LD_H
 #define LD_H
 
 #ifdef HAVE_LOCALE_H
+#endif
+#ifndef SEEK_CUR
+#define SEEK_CUR 1
+#endif
+#ifndef SEEK_END
+#define SEEK_END 2
+#endif
+
+#if defined(__GNUC__) && !defined(C_ALLOCA)
+# undef alloca
+# define alloca __builtin_alloca
+#else
+# if defined(HAVE_ALLOCA_H) && !defined(C_ALLOCA)
+#  include <alloca.h>
+# else
+#  ifndef alloca /* predefined by HP cc +Olibcalls */
+#   if !defined (__STDC__) && !defined (__hpux)
+char *alloca ();
+#   else
+void *alloca ();
+#   endif /* __STDC__, __hpux */
+#  endif /* alloca */
+# endif /* HAVE_ALLOCA_H */
+#endif
+
+
+#ifdef HAVE_LOCALE_H
+# ifndef ENABLE_NLS
+   /* The Solaris version of locale.h always includes libintl.h.  If we have
+      been configured with --disable-nls then ENABLE_NLS will not be defined
+      and the dummy definitions of bindtextdomain (et al) below will conflict
+      with the defintions in libintl.h.  So we define these values to prevent
+      the bogus inclusion of libintl.h.  */
+#  define _LIBINTL_H
+#  define _LIBGETTEXT_H
+# endif
 # include <locale.h>
 #endif
 
 # include <locale.h>
 #endif
 
@@ -44,8 +81,6 @@
 # define N_(String) (String)
 #endif
 
 # define N_(String) (String)
 #endif
 
-#include "bin-bugs.h"
-
 /* Look in this environment name for the linker to pretend to be */
 #define EMULATION_ENVIRON "LDEMULATION"
 /* If in there look for the strings: */
 /* Look in this environment name for the linker to pretend to be */
 #define EMULATION_ENVIRON "LDEMULATION"
 /* If in there look for the strings: */
@@ -88,28 +123,15 @@ struct map_symbol_def {
   struct map_symbol_def *next;
 };
 
   struct map_symbol_def *next;
 };
 
-/* Extra information we hold on sections */
-typedef struct lean_user_section_struct {
-  /* For output sections: pointer to the section where this data will go.  */
-  struct lang_input_statement_struct *file;
-} lean_section_userdata_type;
-
 /* The initial part of fat_user_section_struct has to be idential with
    lean_user_section_struct.  */
 typedef struct fat_user_section_struct {
 /* The initial part of fat_user_section_struct has to be idential with
    lean_user_section_struct.  */
 typedef struct fat_user_section_struct {
-  /* For output sections: pointer to the section where this data will go.  */
-  struct lang_input_statement_struct *file;
   /* For input sections, when writing a map file: head / tail of a linked
      list of hash table entries for symbols defined in this section.  */
   struct map_symbol_def *map_symbol_def_head;
   struct map_symbol_def **map_symbol_def_tail;
 } fat_section_userdata_type;
 
   /* For input sections, when writing a map file: head / tail of a linked
      list of hash table entries for symbols defined in this section.  */
   struct map_symbol_def *map_symbol_def_head;
   struct map_symbol_def **map_symbol_def_tail;
 } fat_section_userdata_type;
 
-#define SECTION_USERDATA_SIZE \
- (command_line.reduce_memory_overheads \
-  ? sizeof (lean_section_userdata_type) \
-  : sizeof (fat_section_userdata_type))
-
 #define get_userdata(x) ((x)->userdata)
 
 #define BYTE_SIZE      (1)
 #define get_userdata(x) ((x)->userdata)
 
 #define BYTE_SIZE      (1)
@@ -155,9 +177,6 @@ typedef struct {
      files.  */
   bfd_boolean warn_mismatch;
 
      files.  */
   bfd_boolean warn_mismatch;
 
-  /* Remove unreferenced sections?  */
-  bfd_boolean gc_sections;
-
   /* Name of shared object whose symbol table should be filtered with
      this shared object.  From the --filter option.  */
   char *filter_shlib;
   /* Name of shared object whose symbol table should be filtered with
      this shared object.  From the --filter option.  */
   char *filter_shlib;
@@ -170,6 +189,9 @@ typedef struct {
      .exports sections.  */
   char *version_exports_section;
 
      .exports sections.  */
   char *version_exports_section;
 
+  /* Default linker script.  */
+  char *default_script;
+
   /* If TRUE (the default) check section addresses, once compute,
      fpor overlaps.  */
   bfd_boolean check_section_addresses;
   /* If TRUE (the default) check section addresses, once compute,
      fpor overlaps.  */
   bfd_boolean check_section_addresses;
@@ -180,10 +202,22 @@ typedef struct {
      input files.  */
   bfd_boolean accept_unknown_input_arch;
 
      input files.  */
   bfd_boolean accept_unknown_input_arch;
 
-  /* If TRUE reduce memory overheads, at the expense of speed.
-     This will cause map file generation to use an O(N^2) algorithm.  */
-  bfd_boolean reduce_memory_overheads;
-
+  /* -Bsymbolic and -Bsymbolic-functions, as set on command line.  */
+  enum
+    {
+      symbolic_unset = 0,
+      symbolic,
+      symbolic_functions,
+    } symbolic;
+
+  /* --dynamic-list, --dynamic-list-cpp-new, --dynamic-list-cpp-typeinfo
+     and --dynamic-list FILE, as set on command line.  */
+  enum
+    {
+      dynamic_list_unset = 0,
+      dynamic_list_data,
+      dynamic_list
+    } dynamic_list;
 } args_type;
 
 extern args_type command_line;
 } args_type;
 
 extern args_type command_line;
@@ -249,16 +283,16 @@ typedef struct {
 
   /* The size of the hash table to use.  */
   bfd_size_type hash_table_size;
 
   /* The size of the hash table to use.  */
   bfd_size_type hash_table_size;
+
+  /* The maximum page size for ELF.  */
+  bfd_vma maxpagesize;
+
+  /* The common page size for ELF.  */
+  bfd_vma commonpagesize;
 } ld_config_type;
 
 extern ld_config_type config;
 
 } ld_config_type;
 
 extern ld_config_type config;
 
-typedef enum {
-  lang_first_phase_enum,
-  lang_allocating_phase_enum,
-  lang_final_phase_enum
-} lang_phase_type;
-
 extern FILE * saved_script_handle;
 extern bfd_boolean force_make_executable;
 
 extern FILE * saved_script_handle;
 extern bfd_boolean force_make_executable;
 
@@ -267,6 +301,7 @@ extern int parsing_defsym;
 
 extern int yyparse (void);
 extern void add_cref (const char *, bfd *, asection *, bfd_vma);
 
 extern int yyparse (void);
 extern void add_cref (const char *, bfd *, asection *, bfd_vma);
+extern bfd_boolean handle_asneeded_cref (bfd *, enum notice_asneeded_action);
 extern void output_cref (FILE *);
 extern void check_nocrossrefs (void);
 extern void ld_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
 extern void output_cref (FILE *);
 extern void check_nocrossrefs (void);
 extern void ld_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
This page took 0.025572 seconds and 4 git commands to generate.