xen/init: Move initcall infrastructure into .init.data
authorAndrew Cooper <andrew.cooper3@citrix.com>
Tue, 21 Jun 2016 16:38:25 +0000 (17:38 +0100)
committerAndrew Cooper <andrew.cooper3@citrix.com>
Thu, 23 Jun 2016 11:58:00 +0000 (12:58 +0100)
Its contents is constant.

The ALIGN(32) is also dropped.  On x86, there is nothing between it and a
larger alignment.  On ARM, __init_end_efi is between the two, but its sole use
is to fill SizeOfRawData in the PE Section Table, and doesn't require any
specific alignment.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
Acked-by: Julien Grall <julien.grall@arm.com>
xen/arch/arm/xen.lds.S
xen/arch/x86/xen.lds.S
xen/include/xen/init.h

index b00ee81cd8c647ac05fb17321b44c6732aaf7926..b18c9c2cf71f4ff73fcd5cd0a1fbcdcdb59456dc 100644 (file)
@@ -145,6 +145,12 @@ SECTIONS
        *(.init.proc.info)
        __proc_info_end = .;
 
+       __initcall_start = .;
+       *(.initcallpresmp.init)
+       __presmp_initcall_end = .;
+       *(.initcall1.init)
+       __initcall_end = .;
+
        *(.init.data)
        *(.init.data.rel)
        *(.init.data.rel.*)
@@ -154,14 +160,6 @@ SECTIONS
        *(.init_array)
        __ctors_end = .;
   } :text
-  . = ALIGN(32);
-  .initcall.init : {
-       __initcall_start = .;
-       *(.initcallpresmp.init)
-       __presmp_initcall_end = .;
-       *(.initcall1.init)
-       __initcall_end = .;
-  } :text
   __init_end_efi = .;
   . = ALIGN(STACK_SIZE);
   __init_end = .;
index 2443b931f063e81c0569d33e797af6c01026af17..a1678d8328e8e959659c31e3aae6f312314404d0 100644 (file)
@@ -158,6 +158,12 @@ SECTIONS
        *(.init.setup)
        __setup_end = .;
 
+       __initcall_start = .;
+       *(.initcallpresmp.init)
+       __presmp_initcall_end = .;
+       *(.initcall1.init)
+       __initcall_end = .;
+
        *(.init.data)
        *(.init.data.rel)
        *(.init.data.rel.*)
@@ -183,14 +189,6 @@ SECTIONS
        *(.ctors)
        __ctors_end = .;
   } :text
-  . = ALIGN(32);
-  .initcall.init : {
-       __initcall_start = .;
-       *(.initcallpresmp.init)
-       __presmp_initcall_end = .;
-       *(.initcall1.init)
-       __initcall_end = .;
-  } :text
   . = ALIGN(PAGE_SIZE);
   __init_end = .;
 
index b04bcf98c10841b8b1f2199ad1f87d59c1b89225..0afc43034a6b66748adacfb7835286102f4b8813 100644 (file)
@@ -61,9 +61,9 @@ typedef int (*initcall_t)(void);
 typedef void (*exitcall_t)(void);
 
 #define presmp_initcall(fn) \
-    static initcall_t __initcall_##fn __init_call("presmp") = fn
+    const static initcall_t __initcall_##fn __init_call("presmp") = fn
 #define __initcall(fn) \
-    static initcall_t __initcall_##fn __init_call("1") = fn
+    const static initcall_t __initcall_##fn __init_call("1") = fn
 #define __exitcall(fn) \
     static exitcall_t __exitcall_##fn __exit_call = fn