* layout.cc (Layout::relaxation_loop_body): Only clear load_seg if
[deliverable/binutils-gdb.git] / gold / layout.cc
index 39aabf50e0481b4c184467ab03cf1bc3b514e9e4..2a8d3b49c01f1c182671c40fd7fe58344552f9f6 100644 (file)
@@ -2095,8 +2095,12 @@ Layout::relaxation_loop_body(
   // If the user set the address of the text segment, that may not be
   // compatible with putting the segment headers and file headers into
   // that segment.
-  if (parameters->options().user_set_Ttext())
-    load_seg = NULL;
+  if (parameters->options().user_set_Ttext()
+      && parameters->options().Ttext() % target->common_pagesize() != 0)
+    {
+      load_seg = NULL;
+      phdr_seg = NULL;
+    }
 
   gold_assert(phdr_seg == NULL
              || load_seg != NULL
This page took 0.022985 seconds and 4 git commands to generate.