From af6156ef8ded31c7b8e19fa7995e4de14a5b9639 Mon Sep 17 00:00:00 2001 From: Ian Lance Taylor Date: Tue, 22 Jul 2008 23:01:20 +0000 Subject: * options.h (class General_options): Define -n/--nmagic and -N/--omagic. * options.cc (General_options::finalize): For -n/--nmagic or -N/--omagic, set -static. * layout.cc (Layout::attach_allocated_section_to_segment): If -N/--omagic, don't put read-only and read-write sections in different segments. (Layout::find_first_load_seg): If -N/--omagic, don't insist on finding a read-only segment. (Layout::set_segment_offsets): If -N/--omagic or -n/--nmagic, don't set the minimum segment alignment to the common page size, and don't set the file offset to the address modulo the page size. * script-sections.cc (Script_sections::create_segments): If -n/--omagic, don't put read-only and read-write sections in different segments. --- gold/options.cc | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'gold/options.cc') diff --git a/gold/options.cc b/gold/options.cc index 03686e0..9b0cebf 100644 --- a/gold/options.cc +++ b/gold/options.cc @@ -706,6 +706,10 @@ General_options::finalize() this->set_user_set_Map(); } + // Using -n or -N implies -static. + if (this->nmagic() || this->omagic()) + this->set_static(true); + // If --thread_count is specified, it applies to // --thread-count-{initial,middle,final}, though it doesn't override // them. -- cgit v1.1