[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-devel] [PATCH 3/5] x86/link: Reduce the number of sections created



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 <andrew.cooper3@xxxxxxxxxx>
CC: Jan Beulich <JBeulich@xxxxxxxx>

---
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


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.