From mboxrd@z Thu Jan 1 00:00:00 1970 From: George Dunlap Subject: Re: [PATCH 4/8] xen/x86: Fix section type mismatch in mm.c Date: Wed, 10 Feb 2016 10:01:09 +0000 Message-ID: <56BB0A65.9000002@citrix.com> References: <1455048108-5045-1-git-send-email-andrew.cooper3@citrix.com> <1455048108-5045-5-git-send-email-andrew.cooper3@citrix.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <1455048108-5045-5-git-send-email-andrew.cooper3@citrix.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Andrew Cooper , Xen-devel Cc: George Dunlap , Jan Beulich List-Id: xen-devel@lists.xenproject.org On 09/02/16 20:01, Andrew Cooper wrote: > 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 Acked-by: George Dunlap > --- > CC: Jan Beulich > CC: George Dunlap > --- > xen/arch/x86/mm.c | 2 +- > xen/arch/x86/xen.lds.S | 2 +- > 2 files changed, 2 insertions(+), 2 deletions(-) > > diff --git a/xen/arch/x86/mm.c b/xen/arch/x86/mm.c > index d62d9ec..c214fc5 100644 > --- a/xen/arch/x86/mm.c > +++ b/xen/arch/x86/mm.c > @@ -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) > { > diff --git a/xen/arch/x86/xen.lds.S b/xen/arch/x86/xen.lds.S > index c1ce027..3b199ca 100644 > --- a/xen/arch/x86/xen.lds.S > +++ b/xen/arch/x86/xen.lds.S > @@ -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 = .; >