* layout.cc (Layout::relaxation_loop_body): Don't crash if we see

program headers with no load segment if there is a linker script.
This commit is contained in:
Ian Lance Taylor 2009-10-16 05:16:09 +00:00
parent 661be1e21e
commit 68b6574b4d
2 changed files with 6 additions and 1 deletions

View File

@ -1,5 +1,8 @@
2009-10-15 Ian Lance Taylor <iant@google.com>
* layout.cc (Layout::relaxation_loop_body): Don't crash if we see
program headers with no load segment if there is a linker script.
* layout.cc (Layout::set_segment_offsets): Align the file offset
to the segment aligment for -N or -n with no load segment.
* output.cc (Output_segment::add_output_section): Don't crash if

View File

@ -1421,7 +1421,9 @@ Layout::relaxation_loop_body(
!= General_options::OBJECT_FORMAT_ELF)
load_seg = NULL;
gold_assert(phdr_seg == NULL || load_seg != NULL);
gold_assert(phdr_seg == NULL
|| load_seg != NULL
|| this->script_options_->saw_sections_clause());
// Lay out the segment headers.
if (!parameters->options().relocatable())