* script-sections.cc (Script_sections::create_segments): Don't put
authorIan Lance Taylor <ian@airs.com>
Tue, 23 Jun 2009 06:07:50 +0000 (06:07 +0000)
committerIan Lance Taylor <ian@airs.com>
Tue, 23 Jun 2009 06:07:50 +0000 (06:07 +0000)
program headers in a PT_LOAD segment if -n or -N.

gold/ChangeLog
gold/script-sections.cc

index fea0a34d2c42155a8d94afe8fba8b4c6138ac8e1..ed774ac700625bf5f435635336eee820259bdbf8 100644 (file)
@@ -1,4 +1,9 @@
-2009-06-22  Ian Lance Taylor  <ian@airs.com>
+2009-06-22  Ian Lance Taylor  <iant@google.com>
+
+       * script-sections.cc (Script_sections::create_segments): Don't put
+       program headers in a PT_LOAD segment if -n or -N.
+
+2009-06-22  Ian Lance Taylor  <iant@google.com>
 
        PR 10141
        * options.h (class General_options): Add -z lazy and -z now.  Sort
index 9daf9ece1da74244c1cd233da38ea948015958e0..23610aced422ea9322a404351965c436ec75f50f 100644 (file)
@@ -2981,6 +2981,11 @@ Script_sections::create_segments(Layout* layout)
   if (first_seg == NULL)
     return NULL;
 
+  // -n or -N mean that the program is not demand paged and there is
+  // no need to put the program headers in a PT_LOAD segment.
+  if (parameters->options().nmagic() || parameters->options().omagic())
+    return NULL;
+
   size_t sizeof_headers = this->total_header_size(layout);
 
   uint64_t vma = first_seg->vaddr();
This page took 0.030588 seconds and 4 git commands to generate.