summaryrefslogtreecommitdiff
path: root/gold
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2011-10-19 15:05:58 +0000
committerIan Lance Taylor <ian@airs.com>2011-10-19 15:05:58 +0000
commitea0d8c4740b09bb4d919a3e6b53d7a141f76a2bd (patch)
tree50897e96b062747ac46fa0ea1c2817548acfb13e /gold
parent1d5316ab67e12d6fb58c29728eb72fa937521e94 (diff)
PR gold/13204
* layout.cc (Layout::segment_precedes): Don't assert failure if a --section-start option was seen. * options.h (General_options::any_section_start): New function.
Diffstat (limited to 'gold')
-rw-r--r--gold/ChangeLog7
-rw-r--r--gold/layout.cc5
-rw-r--r--gold/options.h5
3 files changed, 15 insertions, 2 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 153eead12b..68572441b1 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -1,3 +1,10 @@
+2011-10-19 Ian Lance Taylor <iant@google.com>
+
+ PR gold/13204
+ * layout.cc (Layout::segment_precedes): Don't assert failure if a
+ --section-start option was seen.
+ * options.h (General_options::any_section_start): New function.
+
2011-10-18 David S. Miller <davem@davemloft.net>
PR binutils/13301
diff --git a/gold/layout.cc b/gold/layout.cc
index 2f77e5646a..a4ef31ac5c 100644
--- a/gold/layout.cc
+++ b/gold/layout.cc
@@ -2976,8 +2976,9 @@ Layout::segment_precedes(const Output_segment* seg1,
// We shouldn't get here--we shouldn't create segments which we
// can't distinguish. Unless of course we are using a weird linker
- // script.
- gold_assert(this->script_options_->saw_phdrs_clause());
+ // script or overlapping --section-start options.
+ gold_assert(this->script_options_->saw_phdrs_clause()
+ || parameters->options().any_section_start());
return false;
}
diff --git a/gold/options.h b/gold/options.h
index 427e9574fd..28377908b7 100644
--- a/gold/options.h
+++ b/gold/options.h
@@ -1381,6 +1381,11 @@ class General_options
bool
section_start(const char* secname, uint64_t* paddr) const;
+ // Return whether any --section-start option was used.
+ bool
+ any_section_start() const
+ { return !this->section_starts_.empty(); }
+
enum Fix_v4bx
{
// Leave original instruction.