diff options
author | Alan Modra <amodra@gmail.com> | 2013-04-21 23:21:56 +0000 |
---|---|---|
committer | Alan Modra <amodra@gmail.com> | 2013-04-21 23:21:56 +0000 |
commit | a40347502e1064a38b00bcd2176c754a9f534e30 (patch) | |
tree | acef6520e4ef0e30cd5cc9215dd69ce4de29a85a /gold/layout.cc | |
parent | e365947e94ae988334c4c9ef9496fc35d8978884 (diff) | |
download | binutils-gdb-a40347502e1064a38b00bcd2176c754a9f534e30.tar.gz |
PR gold/15355
* layout.cc (Layout::segment_precedes): Allow more than one
segment with the same type and flags.
Diffstat (limited to 'gold/layout.cc')
-rw-r--r-- | gold/layout.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gold/layout.cc b/gold/layout.cc index f2dc6da1913..13f57cb82f8 100644 --- a/gold/layout.cc +++ b/gold/layout.cc @@ -3175,12 +3175,14 @@ Layout::segment_precedes(const Output_segment* seg1, // The order of non-PT_LOAD segments is unimportant. We simply sort // 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 != type2) return type1 < type2; - gold_assert(flags1 != flags2); + gold_assert(flags1 != flags2 + || this->script_options_->saw_phdrs_clause()); return flags1 < flags2; } |