From mboxrd@z Thu Jan 1 00:00:00 1970 From: Julien Grall Subject: [RFC 02/24] xen: Introduce __initconst to store initial const data Date: Fri, 16 Aug 2013 22:05:34 +0100 Message-ID: <1376687156-6737-3-git-send-email-julien.grall@linaro.org> References: <1376687156-6737-1-git-send-email-julien.grall@linaro.org> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1376687156-6737-1-git-send-email-julien.grall@linaro.org> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: stefano.stabellini@eu.citrix.com, ian.campbell@citrix.com Cc: xen-devel@lists.xen.org, Julien Grall , andre.przywara@linaro.org, patches@linaro.org List-Id: xen-devel@lists.xenproject.org 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 --- xen/include/xen/init.h | 1 + 1 file changed, 1 insertion(+) 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") -- 1.7.10.4