/* 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,
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;
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 */
typedef struct {
lang_statement_header_type header;
- fill_type fill;
+ fill_type *fill;
int size;
asection *output_section;
} lang_fill_statement_type;
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;
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
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;
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;
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;
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 *,
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) \
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));
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 *));
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