* layout.cc (segment_precedes): Sort segments by their physical
addresses, if they have been set.
+2010-08-24 Nick Clifton <nickc@redhat.com>
+
+ PR 11899
+ * layout.cc (segment_precedes): Sort segments by their physical
+ addresses, if they have been set.
+
2010-08-23 Cary Coutant <ccoutant@google.com>
* archive.cc (Lib_group::add_symbols): Lock object before deleting its
if (section_count1 > 0 && section_count2 == 0)
return false;
- uint64_t paddr1 = seg1->first_section_load_address();
- uint64_t paddr2 = seg2->first_section_load_address();
+ uint64_t paddr1 = (seg1->are_addresses_set()
+ ? seg1->paddr()
+ : seg1->first_section_load_address());
+ uint64_t paddr2 = (seg2->are_addresses_set()
+ ? seg2->paddr()
+ : seg2->first_section_load_address());
+
if (paddr1 != paddr2)
return paddr1 < paddr2;
}