bfd/
[deliverable/binutils-gdb.git] / ld / ldlang.h
index cf5b01ff3d08ae5cb068430d2951be80239507d2..6106cea4f92e6d42a9682fbc5967f3835dfd893b 100644 (file)
@@ -1,6 +1,6 @@
 /* ldlang.h - linker command language support
    Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
-   2001, 2002, 2003, 2004, 2005
+   2001, 2002, 2003, 2004, 2005, 2006
    Free Software Foundation, Inc.
 
    This file is part of GLD, the Gnu Linker.
@@ -54,7 +54,7 @@ typedef struct memory_region_struct
   bfd_vma origin;
   bfd_size_type length;
   bfd_vma current;
-  bfd_size_type old_length;
+  union lang_statement_union *last_os;
   flagword flags;
   flagword not_flags;
   bfd_boolean had_full_message;
@@ -108,11 +108,8 @@ typedef struct lang_output_statement_struct
 enum section_type
 {
   normal_section,
-  dsect_section,
-  copy_section,
   noload_section,
-  info_section,
-  overlay_section
+  noalloc_section
 };
 
 /* This structure holds a list of program headers describing
@@ -153,7 +150,8 @@ typedef struct lang_output_section_statement_struct
   int constraint;
   flagword flags;
   enum section_type sectype;
-  unsigned int processed : 1;
+  unsigned int processed_vma : 1;
+  unsigned int processed_lma : 1;
   unsigned int all_input_readonly : 1;
   unsigned int ignored : 1; 
 } lang_output_section_statement_type;
@@ -231,7 +229,6 @@ typedef struct lang_input_statement_struct
 
   bfd *the_bfd;
 
-  bfd_boolean closed;
   file_ptr passive_position;
 
   /* Symbol table of the file.  */
@@ -245,40 +242,42 @@ typedef struct lang_input_statement_struct
   /* Point to the next file, but skips archive contents.  */
   union lang_statement_union *next_real_file;
 
-  bfd_boolean is_archive;
+  const char *target;
+
+  unsigned int closed : 1;
+  unsigned int is_archive : 1;
 
   /* 1 means search a set of directories for this file.  */
-  bfd_boolean search_dirs_flag;
+  unsigned int search_dirs_flag : 1;
 
   /* 1 means this was found in a search directory marked as sysrooted,
      if search_dirs_flag is false, otherwise, that it should be
      searched in ld_sysroot before any other location, as long as it
      starts with a slash.  */
-  bfd_boolean sysrooted;
+  unsigned int sysrooted : 1;
 
   /* 1 means this is base file of incremental load.
      Do not load this file's text or data.
      Also default text_start to after this file's bss.  */
-  bfd_boolean just_syms_flag;
+  unsigned int just_syms_flag : 1;
 
   /* Whether to search for this entry as a dynamic archive.  */
-  bfd_boolean dynamic;
+  unsigned int dynamic : 1;
 
   /* Whether DT_NEEDED tags should be added for dynamic libraries in
      DT_NEEDED tags from this entry.  */
-  bfd_boolean add_needed;
+  unsigned int add_needed : 1;
 
   /* Whether this entry should cause a DT_NEEDED tag only when
      satisfying references from regular files, or always.  */
-  bfd_boolean as_needed;
+  unsigned int as_needed : 1;
 
   /* Whether to include the entire contents of an archive.  */
-  bfd_boolean whole_archive;
+  unsigned int whole_archive : 1;
 
-  bfd_boolean loaded;
+  unsigned int loaded : 1;
 
-  const char *target;
-  bfd_boolean real;
+  unsigned int real : 1;
 } lang_input_statement_type;
 
 typedef struct
@@ -307,6 +306,15 @@ typedef void (*walk_wild_section_handler_t) (lang_wild_statement_type *,
 typedef bfd_boolean (*lang_match_sec_type_func) (bfd *, const asection *,
                                                 bfd *, const asection *);
 
+/* Binary search tree structure to efficiently sort sections by
+   name.  */
+typedef struct lang_section_bst
+{
+  asection *section;
+  struct lang_section_bst *left;
+  struct lang_section_bst *right;
+} lang_section_bst_type;
+
 struct lang_wild_statement_struct
 {
   lang_statement_header_type header;
@@ -318,6 +326,7 @@ struct lang_wild_statement_struct
 
   walk_wild_section_handler_t walk_wild_section_handler;
   struct wildcard_list *handler_data[4];
+  lang_section_bst_type *tree;
 };
 
 typedef struct lang_address_statement_struct
@@ -383,6 +392,8 @@ struct lang_phdr
   etree_type *flags;
 };
 
+extern struct lang_phdr *lang_phdr_list;
+
 /* This structure is used to hold a list of sections which may not
    cross reference each other.  */
 
@@ -591,6 +602,8 @@ extern struct bfd_elf_version_deps *lang_add_vers_depend
   (struct bfd_elf_version_deps *, const char *);
 extern void lang_register_vers_node
   (const char *, struct bfd_elf_version_tree *, struct bfd_elf_version_deps *);
+extern void lang_append_dynamic_list (struct bfd_elf_version_expr *);
+extern void lang_append_dynamic_list_cpp_typeinfo (void);
 bfd_boolean unique_section_p
   (const asection *);
 extern void lang_add_unique
This page took 0.036709 seconds and 4 git commands to generate.