* emulparams/elf64btsmip.sh: n64 replaces .reginfo with .MIPS.options.
[deliverable/binutils-gdb.git] / ld / ldlang.h
index d327bd3dec01bf0110188fb72f925b29e6b97dac..4e3353ac7fea78b6f7b1907755db5605130b427c 100644 (file)
@@ -1,12 +1,13 @@
 /* ldlang.h - linker command language support
-   Copyright 1991, 92, 93, 94, 95, 96, 97, 98, 99, 2000
+   Copyright 1991, 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000,
+   2001, 2002
    Free Software Foundation, Inc.
 
    This file is part of GLD, the Gnu Linker.
 
    GLD is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
-   the Free Software Foundation; either version 1, or (at your option)
+   the Free Software Foundation; either version 2, or (at your option)
    any later version.
 
    GLD is distributed in the hope that it will be useful,
@@ -31,7 +32,10 @@ typedef enum {
   lang_input_file_is_file_enum
 } lang_input_file_enum_type;
 
-typedef unsigned int fill_type;
+struct _fill_type {
+  size_t size;
+  unsigned char data[1];
+};
 
 typedef struct statement_list {
   union lang_statement_union *head;
@@ -124,7 +128,7 @@ typedef struct lang_output_section_statement_struct {
   struct memory_region_struct *region;
   struct memory_region_struct *lma_region;
   size_t block_value;
-  fill_type fill;
+  fill_type *fill;
 
   int subsection_alignment;    /* alignment of components */
   int section_alignment;       /* alignment of start of section */
@@ -144,7 +148,7 @@ typedef struct {
 
 typedef struct {
   lang_statement_header_type header;
-  fill_type fill;
+  fill_type *fill;
   int size;
   asection *output_section;
 } lang_fill_statement_type;
@@ -256,12 +260,10 @@ typedef struct {
 
 typedef struct lang_wild_statement_struct {
   lang_statement_header_type header;
-  const char *section_name;
-  boolean sections_sorted;
   const char *filename;
   boolean filenames_sorted;
+  struct wildcard_list *section_list;
   boolean keep_sections;
-  struct name_list *exclude_filename_list;
   lang_statement_list_type children;
 } lang_wild_statement_type;
 
@@ -276,7 +278,7 @@ typedef struct {
   bfd_vma output_offset;
   size_t size;
   asection *output_section;
-  fill_type fill;
+  fill_type *fill;
 } lang_padding_statement_type;
 
 /* A group statement collects a set of libraries together.  The
@@ -291,7 +293,6 @@ typedef struct {
 
 typedef union lang_statement_union {
   lang_statement_header_type header;
-  union lang_statement_union *next;
   lang_wild_statement_type wild_statement;
   lang_data_statement_type data_statement;
   lang_reloc_statement_type reloc_statement;
@@ -340,6 +341,16 @@ struct lang_nocrossrefs {
 
 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.  */
+
+struct unique_sections {
+  struct unique_sections *next;
+  const char *name;
+};
+
+extern struct unique_sections *unique_section_list;
+
 extern lang_output_section_statement_type *abs_output_section;
 extern lang_statement_list_type lang_output_section_statement;
 extern boolean lang_has_input_file;
@@ -348,6 +359,7 @@ extern lang_statement_list_type *stat_ptr;
 extern boolean delete_output_file_on_failure;
 
 extern const char *entry_symbol;
+extern const char *entry_section;
 extern boolean entry_from_cmdline;
 extern lang_statement_list_type file_chain;
 
@@ -374,15 +386,15 @@ extern void lang_section_start PARAMS ((const char *, union etree_union *));
 extern void lang_add_entry PARAMS ((const char *, boolean));
 extern void lang_add_target PARAMS ((const char *));
 extern void lang_add_wild
-  PARAMS ((const char *, boolean, const char *, boolean, boolean, name_list *));
+  PARAMS ((struct wildcard_spec *, struct wildcard_list *, boolean));
 extern void lang_add_map PARAMS ((const char *));
-extern void lang_add_fill PARAMS ((int));
+extern void lang_add_fill PARAMS ((fill_type *));
 extern lang_assignment_statement_type * lang_add_assignment PARAMS ((union etree_union *));
 extern void lang_add_attribute PARAMS ((enum statement_enum));
 extern void lang_startup PARAMS ((const char *));
 extern void lang_float PARAMS ((enum bfd_boolean));
 extern void lang_leave_output_section_statement
-  PARAMS ((bfd_vma, const char *, struct lang_output_section_phdr_list *,
+  PARAMS ((fill_type *, const char *, struct lang_output_section_phdr_list *,
            const char *));
 extern void lang_abs_symbol_at_end_of PARAMS ((const char *, const char *));
 extern void lang_abs_symbol_at_beginning_of PARAMS ((const char *,
@@ -394,10 +406,11 @@ extern void lang_for_each_input_file
   PARAMS ((void (*dothis) (lang_input_statement_type *)));
 extern void lang_for_each_file
   PARAMS ((void (*dothis) (lang_input_statement_type *)));
+extern void lang_reset_memory_regions PARAMS ((void));
 extern bfd_vma lang_do_assignments
   PARAMS ((lang_statement_union_type * s,
           lang_output_section_statement_type *output_section_statement,
-          fill_type fill,
+          fill_type *fill,
           bfd_vma dot));
 
 #define LANG_FOR_EACH_INPUT_STATEMENT(statement)               \
@@ -431,11 +444,11 @@ extern void dprint_statement PARAMS ((lang_statement_union_type *, int));
 extern bfd_vma lang_size_sections
   PARAMS ((lang_statement_union_type *s,
           lang_output_section_statement_type *output_section_statement,
-          lang_statement_union_type **prev, fill_type fill,
-          bfd_vma dot, boolean relax));
+          lang_statement_union_type **prev, fill_type *fill,
+          bfd_vma dot, boolean *relax));
 extern void lang_enter_group PARAMS ((void));
 extern void lang_leave_group PARAMS ((void));
-extern void wild_doit
+extern void lang_add_section
   PARAMS ((lang_statement_list_type *ptr, asection *section,
           lang_output_section_statement_type *output,
           lang_input_statement_type *file));
@@ -446,14 +459,14 @@ extern void lang_add_nocrossref PARAMS ((struct lang_nocrossref *));
 extern void lang_enter_overlay PARAMS ((etree_type *, etree_type *, int));
 extern void lang_enter_overlay_section PARAMS ((const char *));
 extern void lang_leave_overlay_section
-  PARAMS ((bfd_vma, struct lang_output_section_phdr_list *));
+  PARAMS ((fill_type *, struct lang_output_section_phdr_list *));
 extern void lang_leave_overlay
-  PARAMS ((bfd_vma, const char *, struct lang_output_section_phdr_list *,
+  PARAMS ((fill_type *, const char *, struct lang_output_section_phdr_list *,
            const char *));
 
 extern struct bfd_elf_version_tree *lang_elf_version_info;
 
-extern struct bfd_elf_version_expr *lang_new_vers_regex
+extern struct bfd_elf_version_expr *lang_new_vers_pattern
   PARAMS ((struct bfd_elf_version_expr *, const char *, const char *));
 extern struct bfd_elf_version_tree *lang_new_vers_node
   PARAMS ((struct bfd_elf_version_expr *, struct bfd_elf_version_expr *));
@@ -462,5 +475,7 @@ extern struct bfd_elf_version_deps *lang_add_vers_depend
 extern void lang_register_vers_node
   PARAMS ((const char *, struct bfd_elf_version_tree *,
           struct bfd_elf_version_deps *));
+boolean unique_section_p PARAMS ((const char *));
+extern void lang_add_unique PARAMS ((const char *));
 
 #endif
This page took 0.024738 seconds and 4 git commands to generate.