public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Adrian Bunk <bunk@fs.tum.de>
To: Linus Torvalds <torvalds@osdl.org>,
	Dave Hansen <haveblue@us.ibm.com>, Andrew Morton <akpm@osdl.org>
Cc: Kernel Mailing List <linux-kernel@vger.kernel.org>
Subject: [patch] 2.6.8-rc3: fix modular kernel with gcc 2.95
Date: Wed, 4 Aug 2004 20:52:36 +0200	[thread overview]
Message-ID: <20040804185236.GV2746@fs.tum.de> (raw)
In-Reply-To: <Pine.LNX.4.58.0408031505470.24588@ppc970.osdl.org>

On Tue, Aug 03, 2004 at 03:09:04PM -0700, Linus Torvalds wrote:
>...
> It would be good if people only sent serious stuff for a while, and we can 
> do a real 2.6.8, ok?
>...


I'm still getting a flood of the following errors when using gcc 2.95:


<--  snip  -->

...
if [ -r System.map ]; then /sbin/depmod -ae -F System.map  2.6.8-rc3; fi
WARNING: /lib/modules/2.6.8-rc3/kernel/sound/pci/ymfpci/snd-ymfpci.ko 
needs unknown symbol free_irq
WARNING: /lib/modules/2.6.8-rc3/kernel/sound/pci/ymfpci/snd-ymfpci.ko 
needs unknown symbol request_irq
WARNING: /lib/modules/2.6.8-rc3/kernel/sound/pci/vx222/snd-vx222.ko 
needs unknown symbol free_irq
WARNING: /lib/modules/2.6.8-rc3/kernel/sound/pci/vx222/snd-vx222.ko 
needs unknown symbol request_irq
WARNING: /lib/modules/2.6.8-rc3/kernel/sound/pci/trident/snd-trident.ko 
needs unknown symbol free_irq
WARNING: /lib/modules/2.6.8-rc3/kernel/sound/pci/trident/snd-trident.ko 
needs unknown symbol request_irq
WARNING: /lib/modules/2.6.8-rc3/kernel/sound/pci/snd-via82xx.ko needs 
unknown symbol free_irq
WARNING: /lib/modules/2.6.8-rc3/kernel/sound/pci/snd-via82xx.ko needs 
unknown symbol request_irq
WARNING: /lib/modules/2.6.8-rc3/kernel/sound/pci/snd-sonicvibes.ko needs 
unknown symbol free_irq
WARNING: /lib/modules/2.6.8-rc3/kernel/sound/pci/snd-sonicvibes.ko needs 
unknown symbol request_irq
WARNING: /lib/modules/2.6.8-rc3/kernel/sound/pci/snd-rme96.ko needs 
unknown symbol free_irq
... [several hundred similar lines siped]

<--  snip  -->


The following patch (as 268-rc2-mm1-link-errors.patch already in -mm) 
fixes this issue:



<--  snip  -->


From: Dave Hansen <haveblue@us.ibm.com>

Investigation of why the build is failing due to bogus detection of
undefined symbols: We're getting this warning:

arch/i386/kernel/irq.c
{standard input}: Assembler messages:
{standard input}:3565: Warning: setting incorrect section type for
.bss.page_aligned

Which comes from this code in the 4k stacks code:

static char softirq_stack[NR_CPUS * THREAD_SIZE]  __attribute__((__aligned__(THREAD_SIZE), __section__(".bss.page_aligned")));
static char hardirq_stack[NR_CPUS * THREAD_SIZE]  __attribute__((__aligned__(THREAD_SIZE), __section__(".bss.page_aligned")));

Removing the __section__() fixes it, as does moving to gcc 3.2 or 3.3,
but gcc 2.95 and 3.0 still exhibit the problem.  It seems the 4k stack
developers like newer compilers than I do :) 

The gcc 2.95 section declaration looks like this:
	.section        .bss.page_aligned,"aw",@progbits
while the 3.1 section looks like this:
	.section        .bss.page_aligned,"aw",@nobits

It's definitely a bug that's been fixed:
http://sources.redhat.com/ml/binutils/2002-10/msg00507.html

I've been told that I can fix it with a carefully crafted assembly file and
maybe a change to the linker script, but all that it buys us is a little
space in the uncompressed kernel image.  Plus, the warning will still be
there at compile-time.  

I say, put them back in plain old BSS.  Patch attached.

Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/arch/i386/kernel/irq.c |    8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diff -puN arch/i386/kernel/irq.c~268-rc2-mm1-link-errors arch/i386/kernel/irq.c
--- 25/arch/i386/kernel/irq.c~268-rc2-mm1-link-errors	2004-07-28 22:11:29.652159016 -0700
+++ 25-akpm/arch/i386/kernel/irq.c	2004-07-28 22:11:29.658158104 -0700
@@ -1118,8 +1118,12 @@ void init_irq_proc (void)
 
 
 #ifdef CONFIG_4KSTACKS
-static char softirq_stack[NR_CPUS * THREAD_SIZE]  __attribute__((__aligned__(THREAD_SIZE), __section__(".bss.page_aligned")));
-static char hardirq_stack[NR_CPUS * THREAD_SIZE]  __attribute__((__aligned__(THREAD_SIZE), __section__(".bss.page_aligned")));
+/*
+ * These should really be __section__(".bss.page_aligned") as well, but
+ * gcc's 3.0 and earlier don't handle that correctly.
+ */
+static char softirq_stack[NR_CPUS * THREAD_SIZE]  __attribute__((__aligned__(THREAD_SIZE)));
+static char hardirq_stack[NR_CPUS * THREAD_SIZE]  __attribute__((__aligned__(THREAD_SIZE)));
 
 /*
  * allocate per-cpu stacks for hardirq and for softirq processing
_

  parent reply	other threads:[~2004-08-04 18:54 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-03 22:09 Linux 2.6.8-rc3 Linus Torvalds
2004-08-04 12:07 ` Jan De Luyck
2004-08-04 12:13   ` Karol Kozimor
2004-08-04 12:40   ` Erik Mouw
2004-08-05 15:10     ` OGAWA Hirofumi
2004-08-05 22:19       ` szonyi calin
2004-08-04 12:57   ` Gene Heskett
2004-08-04 12:44 ` Juergen Stuber
2004-08-04 13:37   ` Geert Uytterhoeven
2004-08-04 15:04 ` Jari Ruusu
2004-08-04 16:00   ` James Morris
2004-08-04 16:10     ` J. Bruce Fields
2004-08-04 16:27       ` Arjan van de Ven
2004-08-04 18:19         ` Patrick McFarland
2004-08-04 18:45           ` Linus Torvalds
2004-08-05 13:54             ` Patrick McFarland
2004-08-04 21:27         ` H. Peter Anvin
2004-08-04 18:37     ` Linux 2.6.8-rc3 - BSD licensing Fruhwirth Clemens
2004-08-04 18:51       ` Linus Torvalds
2004-08-04 19:26         ` Fruhwirth Clemens
2004-08-04 19:56           ` Linus Torvalds
2004-08-05 12:33             ` Jari Ruusu
2004-08-05 16:50               ` Linus Torvalds
2004-08-05 17:45                 ` Måns Rullgård
2004-08-05 20:21                   ` Alan Cox
2004-08-05 21:37                     ` Måns Rullgård
2004-08-05 21:08                       ` Alan Cox
2004-08-06  9:47                 ` Jari Ruusu
2004-08-06 16:39                   ` Linus Torvalds
2004-08-07 10:19                     ` Jari Ruusu
2004-08-07 10:38                       ` Patrick McFarland
2004-08-07 17:27                       ` Linus Torvalds
2004-08-05 12:32     ` Linux 2.6.8-rc3 Jari Ruusu
2004-08-04 16:23   ` Linus Torvalds
2004-08-05 15:04     ` [PATCH] Drop asm i586 AES code James Morris
2004-08-04 15:08 ` Linux 2.6.8-rc3 (compile stats) John Cherry
2004-08-04 18:52 ` Adrian Bunk [this message]
2004-08-06 19:57 ` 2.6.8-rc3: MPT Fusion compile error with PROC_FS=n Adrian Bunk

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=20040804185236.GV2746@fs.tum.de \
    --to=bunk@fs.tum.de \
    --cc=akpm@osdl.org \
    --cc=haveblue@us.ibm.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=torvalds@osdl.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