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

[Xen-changelog] [xen master] xen: Introduce __initconst to store initial const data



commit 887915680a701a2e258676a6c97ae0599ac9e3fe
Author:     Julien Grall <julien.grall@xxxxxxxxxx>
AuthorDate: Wed Aug 28 15:47:16 2013 +0100
Commit:     Ian Campbell <ian.campbell@xxxxxxxxxx>
CommitDate: Tue Sep 10 11:01:08 2013 +0100

    xen: Introduce __initconst to store initial const data
    
    It's possible to have 2 type (const and non-const) of data in the same
    compilation unit. Using only __initdata will result to a compilation error:
    
        error: $variablename causes as section tupe conflict with $variablename2
    
    because a section containing const variables is marked read only and so 
cannot
    contain non-const variables.
    
    Signed-off-by: Julien Grall <julien.grall@xxxxxxxxxx>
    Acked-by: Ian Cambell <ian.campbell@xxxxxxxxxx>
    CC: Jan Beulich <JBeulich@xxxxxxxx>
    CC: Keir Fraser <keir@xxxxxxx>
---
 xen/include/xen/init.h |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/xen/include/xen/init.h b/xen/include/xen/init.h
index b602577..9d481b3 100644
--- a/xen/include/xen/init.h
+++ b/xen/include/xen/init.h
@@ -10,6 +10,7 @@
 #define __init            __text_section(".init.text")
 #define __exit            __text_section(".exit.text")
 #define __initdata        __section(".init.data")
+#define __initconst       __section(".init.rodata")
 #define __exitdata        __used_section(".exit.data")
 #define __initsetup       __used_section(".init.setup")
 #define __init_call(lvl)  __used_section(".initcall" lvl ".init")
--
generated by git-patchbot for /home/xen/git/xen.git#master

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

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