PR gold/13204
authorIan Lance Taylor <ian@airs.com>
Wed, 19 Oct 2011 15:05:58 +0000 (15:05 +0000)
committerIan Lance Taylor <ian@airs.com>
Wed, 19 Oct 2011 15:05:58 +0000 (15:05 +0000)
* 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.

gold/ChangeLog
gold/layout.cc
gold/options.h

index 153eead12b044a1b8daecda86d715c6e09b8d6db..68572441b1aa557e31f60eb4c0f8d052fa468b7d 100644 (file)
@@ -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
index 2f77e5646a26a7f2db02f28886a911d366c4ff56..a4ef31ac5c249db077728f9720562f9c515949d1 100644 (file)
@@ -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;
 }
 
index 427e9574fd68367f2b4e2d107f83708b52db4533..28377908b7b476bec87bcd81f40060d79a1cfe21 100644 (file)
@@ -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.