From: Andrew Cooper Subject: [PATCH 3/5] x86/link: Reduce the number of sections created Date: Fri, 5 Jun 2015 14:31:20 +0100 Message-ID: <1433511082-20472-4-git-send-email-andrew.cooper3@citrix.com> References: <1433511082-20472-1-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1433511082-20472-1-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Xen-devel Cc: Andrew Cooper , Jan Beulich List-Id: xen-devel@lists.xenproject.org There is no need for top level sections for each of these, so they are subsumed into more-generic sections. .data.read_mostly and .lockprofile.data are moved to .data .init.setup, .initcall.init, .xsm_initcall.init are moved to .init.data This will simplify the later adjustments to use superpages. Signed-off-by: Andrew Cooper CC: Jan Beulich --- Jan: Judging from the code, it appears safe for .reloc to be moved into .init.data, although I don't know if this will interfere with some of the PE parts of EFI. If a top level .reloc section is still needed, it should at least move to immediately follow .init.data, which would allow its space to be reused after boot. --- xen/arch/x86/xen.lds.S | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S index 6553cff..8295ecf 100644 --- a/xen/arch/x86/xen.lds.S +++ b/xen/arch/x86/xen.lds.S @@ -68,7 +68,7 @@ SECTIONS } :text . = ALIGN(SMP_CACHE_BYTES); - .data.read_mostly : { + .data : { /* Exception table */ __start___ex_table = .; *(.ex_table) @@ -82,23 +82,21 @@ SECTIONS *(.data.read_mostly) *(.data.rel.ro) *(.data.rel.ro.*) - } :text - .data : { /* Data */ . = ALIGN(PAGE_SIZE); *(.data.page_aligned) *(.data) *(.data.rel) *(.data.rel.*) CONSTRUCTORS - } :text #ifdef LOCK_PROFILE - . = ALIGN(32); - __lock_profile_start = .; - .lockprofile.data : { *(.lockprofile.data) } :text - __lock_profile_end = .; + . = ALIGN(32); + __lock_profile_start = .; + .lockprofile.data : { *(.lockprofile.data) } :text + __lock_profile_end = .; #endif + } :text . = ALIGN(PAGE_SIZE); /* Init code and data */ __init_begin = .; @@ -140,21 +138,18 @@ SECTIONS __ctors_start = .; *(.ctors) __ctors_end = .; - } :text - . = ALIGN(32); - .init.setup : { + + . = ALIGN(32); __setup_start = .; *(.init.setup) __setup_end = .; - } :text - .initcall.init : { + __initcall_start = .; *(.initcallpresmp.init) __presmp_initcall_end = .; *(.initcall1.init) __initcall_end = .; - } :text - .xsm_initcall.init : { + __xsm_initcall_start = .; *(.xsm_initcall.init) __xsm_initcall_end = .; -- 1.7.10.4