2005-09-27 Paul Brook <paul@codesourcery.com>
[deliverable/binutils-gdb.git] / ld / ld.h
diff --git a/ld/ld.h b/ld/ld.h
index 75c054e77547d91272d1b6cd20e1be1b9705510d..9ada8bef95ab5908fe5d75bd1c9e4e6ecce4dd81 100644 (file)
--- a/ld/ld.h
+++ b/ld/ld.h
@@ -1,5 +1,6 @@
 /* ld.h -- general linker header file
-   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2002
+   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+   2001, 2002, 2003, 2004, 2005
    Free Software Foundation, Inc.
 
    This file is part of GLD, the Gnu Linker.
@@ -16,8 +17,8 @@
 
    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
@@ -64,13 +65,18 @@ typedef struct name_list {
 }
 name_list;
 
-/* A wildcard specification.  This is only used in ldgram.y, but it
-   winds up in ldgram.h, so we need to define it outside.  */
+/* A wildcard specification.  */
+
+typedef enum {
+  none, by_name, by_alignment, by_name_alignment, by_alignment_name
+} sort_type;
+
+extern sort_type sort_section;
 
 struct wildcard_spec {
   const char *name;
   struct name_list *exclude_name_list;
-  bfd_boolean sorted;
+  sort_type sorted;
 };
 
 struct wildcard_list {
@@ -78,11 +84,19 @@ struct wildcard_list {
   struct wildcard_spec spec;
 };
 
-/* Extra information we hold on sections */
-typedef struct user_section_struct {
-  /* Pointer to the section where this data will go */
-  struct lang_input_statement_struct *file;
-} section_userdata_type;
+struct map_symbol_def {
+  struct bfd_link_hash_entry *entry;
+  struct map_symbol_def *next;
+};
+
+/* The initial part of fat_user_section_struct has to be idential with
+   lean_user_section_struct.  */
+typedef struct fat_user_section_struct {
+  /* 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 get_userdata(x) ((x)->userdata)
 
@@ -129,9 +143,6 @@ typedef struct {
      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;
@@ -154,6 +165,10 @@ typedef struct {
      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;
+
 } args_type;
 
 extern args_type command_line;
@@ -216,34 +231,28 @@ typedef struct {
   /* If set, only search library directories explicitly selected
      on the command line.  */
   bfd_boolean only_cmd_line_lib_dirs;
+
+  /* The size of the hash table to use.  */
+  bfd_size_type hash_table_size;
 } 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;
 
 /* Non-zero if we are processing a --defsym from the command line.  */
 extern int parsing_defsym;
 
-extern int yyparse PARAMS ((void));
-
-extern void add_cref PARAMS ((const char *, bfd *, asection *, bfd_vma));
-extern void output_cref PARAMS ((FILE *));
-extern void check_nocrossrefs PARAMS ((void));
-
-extern void ld_abort PARAMS ((const char *, int, const char *))
-     ATTRIBUTE_NORETURN;
+extern int yyparse (void);
+extern void add_cref (const char *, bfd *, asection *, bfd_vma);
+extern void output_cref (FILE *);
+extern void check_nocrossrefs (void);
+extern void ld_abort (const char *, int, const char *) ATTRIBUTE_NORETURN;
 
 /* If gcc >= 2.6, we can give a function name, too.  */
 #if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 6)
-#define __PRETTY_FUNCTION__  ((char*) NULL)
+#define __PRETTY_FUNCTION__  NULL
 #endif
 
 #undef abort
This page took 0.028005 seconds and 4 git commands to generate.