PR 14072
[deliverable/binutils-gdb.git] / ld / ldlang.h
index f37409c7b5f8a2fbbd0c456218e0ae787693a2b1..b5d50c5a354e87401d6c1f9bf5def85de1266794 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, 2006, 2007, 2008, 2009, 2010, 2011
+   2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010, 2011, 2012
    Free Software Foundation, Inc.
 
    This file is part of the GNU Binutils.
@@ -228,44 +228,21 @@ typedef struct
   bfd_vma output_offset;
 } lang_reloc_statement_type;
 
-typedef struct lang_input_statement_struct
+struct lang_input_statement_flags
 {
-  lang_statement_header_type header;
-  /* Name of this file.  */
-  const char *filename;
-  /* Name to use for the symbol giving address of text start.
-     Usually the same as filename, but for a file spec'd with
-     -l this is the -l switch itself rather than the filename.  */
-  const char *local_sym_name;
-
-  bfd *the_bfd;
-
-  struct flag_info *section_flag_list;
-
-  /* Point to the next file - whatever it is, wanders up and down
-     archives */
-  union lang_statement_union *next;
-
-  /* Point to the next file, but skips archive contents.  */
-  union lang_statement_union *next_real_file;
-
-  const char *target;
-
+  /* 1 means this file was specified in a -l option.  */
   unsigned int maybe_archive : 1;
 
   /* 1 means search a set of directories for this file.  */
-  unsigned int search_dirs_flag : 1;
+  unsigned int search_dirs : 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.  */
+  /* 1 means this was found when processing a script in the sysroot.  */
   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.  */
-  unsigned int just_syms_flag : 1;
+  unsigned int just_syms : 1;
 
   /* Whether to search for this entry as a dynamic archive.  */
   unsigned int dynamic : 1;
@@ -300,7 +277,32 @@ typedef struct lang_input_statement_struct
   /* Set if reloading an --as-needed lib.  */
   unsigned int reload : 1;
 #endif /* ENABLE_PLUGINS */
+};
+
+typedef struct lang_input_statement_struct
+{
+  lang_statement_header_type header;
+  /* Name of this file.  */
+  const char *filename;
+  /* Name to use for the symbol giving address of text start.
+     Usually the same as filename, but for a file spec'd with
+     -l this is the -l switch itself rather than the filename.  */
+  const char *local_sym_name;
+
+  bfd *the_bfd;
+
+  struct flag_info *section_flag_list;
+
+  /* Point to the next file - whatever it is, wanders up and down
+     archives */
+  union lang_statement_union *next;
+
+  /* Point to the next file, but skips archive contents.  */
+  union lang_statement_union *next_real_file;
+
+  const char *target;
 
+  struct lang_input_statement_flags flags;
 } lang_input_statement_type;
 
 typedef struct
@@ -312,7 +314,8 @@ typedef struct
 typedef struct lang_wild_statement_struct lang_wild_statement_type;
 
 typedef void (*callback_t) (lang_wild_statement_type *, struct wildcard_list *,
-                           asection *, lang_input_statement_type *, void *);
+                           asection *, struct flag_info *,
+                           lang_input_statement_type *, void *);
 
 typedef void (*walk_wild_section_handler_t) (lang_wild_statement_type *,
                                             lang_input_statement_type *,
@@ -416,8 +419,6 @@ 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.  */
 
@@ -435,8 +436,6 @@ struct lang_nocrossrefs
   lang_nocrossref_type *list;
 };
 
-extern struct lang_nocrossrefs *nocrossref_list;
-
 /* This structure is used to hold a list of input section names which
    will not match an output section in the linker script.  */
 
@@ -467,9 +466,12 @@ struct orphan_save
   lang_output_section_statement_type **os_tail;
 };
 
+extern struct lang_phdr *lang_phdr_list;
+extern struct lang_nocrossrefs *nocrossref_list;
 extern const char *output_target;
 extern lang_output_section_statement_type *abs_output_section;
 extern lang_statement_list_type lang_output_section_statement;
+extern struct lang_input_statement_flags input_flags;
 extern bfd_boolean lang_has_input_file;
 extern etree_type *base;
 extern lang_statement_list_type *stat_ptr;
@@ -482,7 +484,6 @@ extern lang_statement_list_type file_chain;
 extern lang_statement_list_type input_file_chain;
 
 extern int lang_statement_iteration;
-extern bfd_boolean missing_file;
 
 extern void lang_init
   (void);
@@ -616,7 +617,7 @@ extern void lang_leave_group
   (void);
 extern void lang_add_section
   (lang_statement_list_type *, asection *,
-   lang_output_section_statement_type *);
+   struct flag_info *, lang_output_section_statement_type *);
 extern void lang_new_phdr
   (const char *, etree_type *, bfd_boolean, bfd_boolean, etree_type *,
    etree_type *);
This page took 0.025968 seconds and 4 git commands to generate.