PR gold/15355
authorAlan Modra <amodra@gmail.com>
Sun, 21 Apr 2013 23:21:56 +0000 (23:21 +0000)
committerAlan Modra <amodra@gmail.com>
Sun, 21 Apr 2013 23:21:56 +0000 (23:21 +0000)
* layout.cc (Layout::segment_precedes): Allow more than one
segment with the same type and flags.

gold/ChangeLog
gold/layout.cc

index 64aedfdd7e93ffc12d00a8b3a2d983e0c68a74de..67d7571eae3424a22c00a98737dbb1cdb35c4ae5 100644 (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>
 
        * layout.cc (Layout::set_relocatable_section_offsets): Don't
 
 2013-04-15  Cary Coutant  <ccoutant@google.com>
 
-       * symtab.cc (Symbol_table::sized_write_globals): Subtract
-       section starting address for relocatable link.
-       * testsuite/Makefile.am (script_test_11): New test.
-       * testsuite/Makefile.in: Regenerate.
-       * testsuite/script_test_11.c: New source file.
-       * testsuite/script_test_11.t: New linker script.
+       * symtab.cc (Symbol_table::sized_write_globals): Subtract
+       section starting address for relocatable link.
+       * testsuite/Makefile.am (script_test_11): New test.
+       * testsuite/Makefile.in: Regenerate.
+       * testsuite/script_test_11.c: New source file.
+       * testsuite/script_test_11.t: New linker script.
 
 2013-04-13  Alan Modra  <amodra@gmail.com>
 
 
 2013-01-28  Cary Coutant  <ccoutant@google.com>
 
-       * dwp.cc (File_list): New typedef.
-       (Dwo_name_info_reader): New class.
-       (Dwo_id_info_reader::Dwo_id_info_reader): Remove unused parameters.
-       (Dwo_id_info_reader::visit_top_die): Remove unused member function.
-       (Dwo_file::~Dwo_file): Delete input_file_ after obj_.
-       (Dwo_file::read_executable): New function.
-       (Dwo_file::read): Move common setup code to ...
-       (Dwo_file::make_object): ... here.
-       (dwp_options): Add --exec/-e.
-       (usage): Likewise.
-       (main): Likewise.
+       * dwp.cc (File_list): New typedef.
+       (Dwo_name_info_reader): New class.
+       (Dwo_id_info_reader::Dwo_id_info_reader): Remove unused parameters.
+       (Dwo_id_info_reader::visit_top_die): Remove unused member function.
+       (Dwo_file::~Dwo_file): Delete input_file_ after obj_.
+       (Dwo_file::read_executable): New function.
+       (Dwo_file::read): Move common setup code to ...
+       (Dwo_file::make_object): ... here.
+       (dwp_options): Add --exec/-e.
+       (usage): Likewise.
+       (main): Likewise.
 
 2013-01-24  Sriraman Tallam  <tmsriram@google.com>
 
 
 2012-12-14  Cary Coutant  <ccoutant@google.com>
 
-       * testsuite/Makefile.am (exception_separate_shared_12_test): Add
-       --no-as-needed flag.
-       (exception_separate_shared_12_test): Likewise.
-       (incremental_copy_test): Likewise.
-       * testsuite/Makefile.in: Regenerate.
+       * testsuite/Makefile.am (exception_separate_shared_12_test): Add
+       --no-as-needed flag.
+       (exception_separate_shared_12_test): Likewise.
+       (incremental_copy_test): Likewise.
+       * testsuite/Makefile.in: Regenerate.
 
 2012-12-14  Cary Coutant  <ccoutant@google.com>
 
index f2dc6da1913e6901e2bfb87286516995743c2bc5..13f57cb82f857b6944209168c61f565925d78bf6 100644 (file)
@@ -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;
     }