All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andrew Cooper <andrew.cooper3@citrix.com>
To: Xen-devel <xen-devel@lists.xen.org>
Cc: George Dunlap <george.dunlap@eu.citrix.com>,
	Andrew Cooper <andrew.cooper3@citrix.com>,
	Jan Beulich <JBeulich@suse.com>
Subject: [PATCH 4/8] xen/x86: Fix section type mismatch in mm.c
Date: Tue, 9 Feb 2016 20:01:44 +0000	[thread overview]
Message-ID: <1455048108-5045-5-git-send-email-andrew.cooper3@citrix.com> (raw)
In-Reply-To: <1455048108-5045-1-git-send-email-andrew.cooper3@citrix.com>

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>
---
CC: Jan Beulich <JBeulich@suse.com>
CC: George Dunlap <george.dunlap@eu.citrix.com>
---
 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 = .;
-- 
2.1.4

  parent reply	other threads:[~2016-02-09 20:01 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-02-09 20:01 [PATCH 0/8] xen/x86: Fix build with Clang 3.5 Andrew Cooper
2016-02-09 20:01 ` [PATCH 1/8] xen/lib: Fix ASSERT() to build with clang Andrew Cooper
2016-02-09 20:01 ` [PATCH 2/8] xen/misc: Remove or annotate possibly-unused functions Andrew Cooper
2016-02-10 10:42   ` Tim Deegan
2016-02-10 13:06   ` Jan Beulich
2016-02-10 13:15     ` Andrew Cooper
2016-02-09 20:01 ` [PATCH 3/8] xen/x86: Remove %z modifier from inline assembly Andrew Cooper
2016-02-10 13:10   ` Jan Beulich
2016-02-09 20:01 ` Andrew Cooper [this message]
2016-02-10 10:01   ` [PATCH 4/8] xen/x86: Fix section type mismatch in mm.c George Dunlap
2016-02-09 20:01 ` [PATCH 5/8] xen/x86: Improve annotation of autogen_entrypoints[] Andrew Cooper
2016-02-09 20:01 ` [PATCH 6/8] xen/x86: Avoid overriding initialisers in arrays Andrew Cooper
2016-02-10 10:11   ` George Dunlap
2016-02-10 13:22   ` Jan Beulich
2016-02-10 13:50     ` Andrew Cooper
2016-02-10 14:03       ` Jan Beulich
2016-02-10 14:13         ` George Dunlap
2016-02-16  7:06   ` Tian, Kevin
2016-02-09 20:01 ` [PATCH 7/8] xen/x86: Fix get_cpu_info() when built with clang Andrew Cooper
2016-02-09 20:01 ` [PATCH 8/8] x86/efi: Generate uefi_call_wrapper() when compiling " Andrew Cooper
2016-02-10 13:31   ` Jan Beulich
2016-02-10 13:41     ` Andrew Cooper
2016-02-10 19:11       ` Andrew Cooper
2016-02-11 10:45         ` Jan Beulich
2016-02-09 21:09 ` [PATCH 0/8] xen/x86: Fix build with Clang 3.5 Doug Goldstein
2016-02-10  9:28 ` Ian Campbell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1455048108-5045-5-git-send-email-andrew.cooper3@citrix.com \
    --to=andrew.cooper3@citrix.com \
    --cc=JBeulich@suse.com \
    --cc=george.dunlap@eu.citrix.com \
    --cc=xen-devel@lists.xen.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.