diff options
author | Ian Lance Taylor <ian@airs.com> | 2009-10-16 05:16:09 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@airs.com> | 2009-10-16 05:16:09 +0000 |
commit | ef7c695e007d46e05e99a1c95812b7e6adcaba69 (patch) | |
tree | 40cabd07a5663416447a122cbf12bb08d5a71c4e /gold/layout.cc | |
parent | e423147746684ea0dc8750ec008c38aef3a88066 (diff) | |
download | binutils-redhat-ef7c695e007d46e05e99a1c95812b7e6adcaba69.tar.gz |
* layout.cc (Layout::relaxation_loop_body): Don't crash if we see
program headers with no load segment if there is a linker script.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r-- | gold/layout.cc | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/gold/layout.cc b/gold/layout.cc index 0b62c18b30..028703ae1c 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -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()) |