diff options
Diffstat (limited to 'gold/script-sections.cc')
-rw-r--r-- | gold/script-sections.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gold/script-sections.cc b/gold/script-sections.cc index 9daf9ec..23610ac 100644 --- a/gold/script-sections.cc +++ b/gold/script-sections.cc @@ -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(); |