PR 10979
authorIan Lance Taylor <ian@airs.com>
Thu, 31 Dec 2009 05:43:29 +0000 (05:43 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 31 Dec 2009 05:43:29 +0000 (05:43 +0000)
* layout.cc (Layout::relaxation_loop_body): If -Ttext was used,
don't put the file header and segment headers in the text
segment.

gold/ChangeLog
gold/layout.cc

index 027940eacb64a3333e634b73f76c2f34e6ff9c88..b2d7a4fd960fe343ac34c587e222b17827596cc6 100644 (file)
@@ -1,5 +1,10 @@
 2009-12-30  Ian Lance Taylor  <iant@google.com>
 
+       PR 10979
+       * layout.cc (Layout::relaxation_loop_body): If -Ttext was used,
+       don't put the file header and segment headers in the text
+       segment.
+
        PR 10979
        * common.cc (Sort_commons::operator()): Stabilize sort when both
        entries are NULL.
index 8bbeebe938ad9e28f08505b1354d10cff36e6a64..c633d7be5fb05da4caa5e98ae7b1494080b4905d 100644 (file)
@@ -1482,6 +1482,12 @@ Layout::relaxation_loop_body(
       != General_options::OBJECT_FORMAT_ELF)
     load_seg = NULL;
 
+  // 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;
+
   gold_assert(phdr_seg == NULL
              || load_seg != NULL
              || this->script_options_->saw_sections_clause());
This page took 0.032538 seconds and 4 git commands to generate.