PR gold/15355

* layout.cc (Layout::segment_precedes): Allow more than one
	segment with the same type and flags.
This commit is contained in:
Alan Modra
2013-04-21 23:21:56 +00:00
parent e365947e94
commit a40347502e
2 changed files with 32 additions and 24 deletions

View File

@ -1,3 +1,9 @@
2013-04-22 Alan Modra <amodra@gmail.com>
PR gold/15355
* layout.cc (Layout::segment_precedes): Allow more than one
segment with the same type and flags.
2013-04-15 Cary Coutant <ccoutant@google.com> 2013-04-15 Cary Coutant <ccoutant@google.com>
* layout.cc (Layout::set_relocatable_section_offsets): Don't * layout.cc (Layout::set_relocatable_section_offsets): Don't

View File

@ -3175,12 +3175,14 @@ Layout::segment_precedes(const Output_segment* seg1,
// The order of non-PT_LOAD segments is unimportant. We simply sort // The order of non-PT_LOAD segments is unimportant. We simply sort
// by the numeric segment type and flags values. There should not // by the numeric segment type and flags values. There should not
// be more than one segment with the same type and flags. // be more than one segment with the same type and flags, except
// when a linker script specifies such.
if (type1 != elfcpp::PT_LOAD) if (type1 != elfcpp::PT_LOAD)
{ {
if (type1 != type2) if (type1 != type2)
return type1 < type2; return type1 < type2;
gold_assert(flags1 != flags2); gold_assert(flags1 != flags2
|| this->script_options_->saw_phdrs_clause());
return flags1 < flags2; return flags1 < flags2;
} }