]> xenbits.xensource.com Git - xen.git/commitdiff
x86: fix section type mismatch in mm.c
authorAndrew Cooper <andrew.cooper3@citrix.com>
Wed, 10 Feb 2016 13:50:37 +0000 (14:50 +0100)
committerJan Beulich <jbeulich@suse.com>
Wed, 10 Feb 2016 13:50:37 +0000 (14:50 +0100)
Clang doesn't like mixing const and non-const data in the same section.  Move
zero_page into .bss.page_aligned.const and wildcard .bss.page_aligned when
linking.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Acked-by: George Dunlap <george.dunlap@citrix.com>
Acked-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/mm.c
xen/arch/x86/xen.lds.S

index d62d9ec0b59be6727c6977a34a6ca56a750e0b44..c214fc5f218993027418ff56c3c96df166ac1517 100644 (file)
@@ -577,7 +577,7 @@ static inline void guest_get_eff_kern_l1e(struct vcpu *v, unsigned long addr,
     TOGGLE_MODE();
 }
 
-static const char __section(".bss.page_aligned") zero_page[PAGE_SIZE];
+static const char __section(".bss.page_aligned.const") zero_page[PAGE_SIZE];
 
 static void invalidate_shadow_ldt(struct vcpu *v, int flush)
 {
index c1ce027af0ebeb83d6ae2e840ffaae7787f8cced..3b199ca7b7d63b869f119991da6f372e3cec1c1e 100644 (file)
@@ -170,7 +170,7 @@ SECTIONS
        __bss_start = .;
        *(.bss.stack_aligned)
        . = ALIGN(PAGE_SIZE);
-       *(.bss.page_aligned)
+       *(.bss.page_aligned*)
        *(.bss)
        . = ALIGN(SMP_CACHE_BYTES);
        __per_cpu_start = .;