Don't check assertions until symbols are finalized. Create an output

section if the script uses a data statement with no input sections.
Don't create a loadable segment for the headers if there is no room.
This commit is contained in:
Ian Lance Taylor
2008-02-28 04:45:47 +00:00
parent 15cf077ef4
commit 919ed24cbc
8 changed files with 166 additions and 58 deletions

View File

@@ -168,6 +168,11 @@ class Layout
void
define_section_symbols(Symbol_table*);
// Create sections for linker scripts.
void
create_script_sections()
{ this->script_options_->create_script_sections(this); }
// Define symbols from any linker script.
void
define_script_symbols(Symbol_table* symtab)
@@ -314,6 +319,10 @@ class Layout
void
get_allocated_sections(Section_list*) const;
// Make a section for a linker script to hold data.
Output_section*
make_output_section_for_script(const char* name);
// Make a segment. This is used by the linker script code.
Output_segment*
make_output_segment(elfcpp::Elf_Word type, elfcpp::Elf_Word flags);