public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jeremy Fitzhardinge <jeremy@goop.org>
To: Stephen Rothwell <sfr@canb.auug.org.au>
Cc: linux-next@vger.kernel.org, linux-kernel@vger.kernel.org,
	Tejun Heo <tj@kernel.org>, Ingo Molnar <mingo@redhat.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>
Subject: Re: linux-next: build failure after merge of the xen tree
Date: Thu, 22 Jul 2010 22:56:13 -0700	[thread overview]
Message-ID: <4C492EFD.1090007@goop.org> (raw)
In-Reply-To: <20100723140107.2883b2d3.sfr@canb.auug.org.au>

On 07/22/2010 09:01 PM, Stephen Rothwell wrote:
> After merging the xen tree, today's linux-next build (86_64 allmodconfig)
> failed like this:
>
> arch/x86/xen/enlighten.c:71: error: __pcpu_scope_xen_vcpu causes a section type conflict
> arch/x86/xen/enlighten.c:72: error: __pcpu_scope_xen_vcpu_info causes a section type conflict
> arch/x86/xen/enlighten.c:71: error: __pcpu_unique_xen_vcpu causes a section type conflict
> arch/x86/xen/enlighten.c:72: error: __pcpu_unique_xen_vcpu_info causes a section type conflict
> arch/x86/xen/enlighten.c:558: error: __pcpu_unique_idt_desc causes a section type conflict
> arch/x86/xen/enlighten.c:760: error: __pcpu_unique_xen_cr0_value causes a section type conflict
>
> Not sure what has caused this.  I have dropped the xen tree for today.
>
> gcc version 4.4.4 binutils version 2.20.1.
>   

I can reproduce this.

I bisected it down to change bee6ab53e652a414af20392899879b58cd80d033.

Ah!   That change uses RESERVE_BRK(), which creates a dummy function and
puts it into the .discard section.  Presumably that makes gcc think that
.discard is for code, and so when the percpu stuff starts putting data
into .discard, gcc (now) complains.  If we add more .discard.* sections
then everyone is happy:

diff --git a/arch/x86/include/asm/setup.h b/arch/x86/include/asm/setup.h
index 86b1506..ef292c7 100644
--- a/arch/x86/include/asm/setup.h
+++ b/arch/x86/include/asm/setup.h
@@ -82,7 +82,7 @@ void *extend_brk(size_t size, size_t align);
  * executable.)
  */
 #define RESERVE_BRK(name,sz)						\
-	static void __section(.discard) __used				\
+	static void __section(.discard.text) __used			\
 	__brk_reservation_fn_##name##__(void) {				\
 		asm volatile (						\
 			".pushsection .brk_reservation,\"aw\",@nobits;" \
diff --git a/include/asm-generic/vmlinux.lds.h b/include/asm-generic/vmlinux.lds.h
index 48c5299..ae6b88e 100644
--- a/include/asm-generic/vmlinux.lds.h
+++ b/include/asm-generic/vmlinux.lds.h
@@ -643,6 +643,7 @@
 	EXIT_DATA							\
 	EXIT_CALL							\
 	*(.discard)							\
+	*(.discard.*)							\
 	}
 
 /**

I'll write up a proper patch.


Thanks,
    J

  parent reply	other threads:[~2010-07-23  5:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-07-23  4:01 linux-next: build failure after merge of the xen tree Stephen Rothwell
2010-07-23  4:48 ` Jeremy Fitzhardinge
2010-07-23  5:56 ` Jeremy Fitzhardinge [this message]
2010-07-23  6:05 ` Jeremy Fitzhardinge
2010-07-23  6:59   ` Stephen Rothwell
  -- strict thread matches above, loose matches on Subject: below --
2010-07-28  4:18 Stephen Rothwell
2010-10-25  2:30 Stephen Rothwell
2010-10-25  8:38 ` Ian Campbell
2010-10-25 23:57   ` Jeremy Fitzhardinge
2010-10-27  2:02 Stephen Rothwell
2011-09-15  5:27 Stephen Rothwell
2011-09-15  9:10 ` Jeremy Fitzhardinge

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=4C492EFD.1090007@goop.org \
    --to=jeremy@goop.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-next@vger.kernel.org \
    --cc=mingo@redhat.com \
    --cc=sfr@canb.auug.org.au \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=tj@kernel.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox