* layout.cc (Layout::set_segment_offsets): Accept writable .text
authorAlan Modra <amodra@gmail.com>
Thu, 21 Mar 2013 04:52:55 +0000 (04:52 +0000)
committerAlan Modra <amodra@gmail.com>
Thu, 21 Mar 2013 04:52:55 +0000 (04:52 +0000)
segment when omagic.

gold/ChangeLog
gold/layout.cc

index 52c2067e101c01941e4ab96a1bff1fd5a3d3ebd1..49ed9345a6b822cf5f59b7001904cc1cc23350d2 100644 (file)
@@ -1,3 +1,8 @@
+2013-03-21  Alan Modra  <amodra@gmail.com>
+
+       * layout.cc (Layout::set_segment_offsets): Accept writable .text
+       segment when omagic.
+
 2013-03-21  Alan Modra  <amodra@gmail.com>
 
        * dwp.cc (Dwp_output_file::add_contribution): Avoid signed/unsigned
index 4c48c3c4bb686d5a5b4dc8a847d6e8dc4a254197..8b88deaa43ddb42be4738fdf0de1b32c143cee9f 100644 (file)
@@ -3353,7 +3353,8 @@ Layout::set_segment_offsets(const Target* target, Output_segment* load_seg,
              addr = (*p)->paddr();
            }
          else if (parameters->options().user_set_Ttext()
-                  && ((*p)->flags() & elfcpp::PF_W) == 0)
+                  && (parameters->options().omagic()
+                      || ((*p)->flags() & elfcpp::PF_W) == 0))
            {
              are_addresses_set = true;
            }