aboutsummaryrefslogtreecommitdiff
path: root/gold/layout.cc
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2009-10-16 05:16:09 +0000
committerIan Lance Taylor <ian@airs.com>2009-10-16 05:16:09 +0000
commit68b6574b4d15cd06198aac40c7ad9624a80c1bdb (patch)
tree5b116dff68289444a8b0033d8c6422f82c523f5f /gold/layout.cc
parent661be1e21e12f87f58c14d0ef8caaee770857297 (diff)
downloadgdb-68b6574b4d15cd06198aac40c7ad9624a80c1bdb.zip
gdb-68b6574b4d15cd06198aac40c7ad9624a80c1bdb.tar.gz
gdb-68b6574b4d15cd06198aac40c7ad9624a80c1bdb.tar.bz2
* 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.cc4
1 files changed, 3 insertions, 1 deletions
diff --git a/gold/layout.cc b/gold/layout.cc
index 0b62c18..028703a 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())