Return-Path: Received: from localhost (bix [127.0.0.1]) by localhost.localdomain (8.12.10/8.12.10) with ESMTP id i3F1rBl4008052 for ; Wed, 14 Apr 2004 18:53:11 -0700 Received: from bix [127.0.0.1] by localhost with POP3 (fetchmail-6.2.0) for akpm@localhost (single-drop); Wed, 14 Apr 2004 18:53:11 -0700 (PDT) Received: from fire-2.osdl.org (air1.pdx.osdl.net [172.20.0.5]) by mail.osdl.org (8.11.6/8.11.6) with ESMTP id i3F1r4203263 for ; Wed, 14 Apr 2004 18:53:04 -0700 Received: from ausmtp02.au.ibm.com (ausmtp02.au.ibm.com [202.81.18.187]) by fire-2.osdl.org (8.12.8/8.12.8) with ESMTP id i3F1r1Wf018031 (version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=FAIL) for ; Wed, 14 Apr 2004 18:53:03 -0700 Received: from sd0208e0.au.ibm.com (d23rh904.au.ibm.com [202.81.18.202]) by ausmtp02.au.ibm.com (8.12.10/8.12.10) with ESMTP id i3F1qmx2012782; Thu, 15 Apr 2004 11:52:48 +1000 Received: from ozlabs.au.ibm.com (ozlabs.au.ibm.com [9.190.163.12]) by sd0208e0.au.ibm.com (8.12.10/NCO/VER6.6) with ESMTP id i3F1rKSZ076392; Thu, 15 Apr 2004 11:53:22 +1000 Received: from bach.ozlabs.ibm.com (bach.ozlabs.ibm.com [10.61.2.150]) by ozlabs.au.ibm.com (Postfix) with ESMTP id 9467517DD8; Thu, 15 Apr 2004 11:52:49 +1000 (EST) Subject: Re: modules in 2.6 kernel - question for FAQ? From: Rusty Russell To: Arkadiusz Miskiewicz Cc: Andrew Morton , lkml - Kernel Mailing List In-Reply-To: <200404142142.41137.arekm@pld-linux.org> References: <200404142142.41137.arekm@pld-linux.org> Content-Type: text/plain Message-Id: <1081993968.17782.112.camel@bach> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Thu, 15 Apr 2004 11:52:48 +1000 Content-Transfer-Encoding: 7bit X-MIMEDefang-Filter: osdl$Revision: 1.1 $ X-Scanned-By: MIMEDefang 2.36 X-Spam-Level: X-Spam-Checker-Version: SpamAssassin 2.60 (1.212-2003-09-23-exp) on bix X-Spam-Status: No, hits=-4.9 required=1.0 tests=BAYES_00 autolearn=ham version=2.60 On Thu, 2004-04-15 at 05:42, Arkadiusz Miskiewicz wrote: > insmod: error inserting './Intel537.ko': -1 Invalid module format They didn't use -fno-common. The patch which adds in the warning got lost a while back. Here's a new one... Rusty. Name: Print Warning for Common Symbols Status: Trivial People still build modules wrong, particularly without -fno-common. The resulting modules don't load, but we should at least warn about it. diff -urpN --exclude TAGS -X /home/rusty/devel/kernel/kernel-patches/current-dontdiff --minimal .17714-linux-2.6.5-bk2/kernel/module.c .17714-linux-2.6.5-bk2.updated/kernel/module.c --- .17714-linux-2.6.5-bk2/kernel/module.c 2004-04-15 09:24:16.000000000 +1000 +++ .17714-linux-2.6.5-bk2.updated/kernel/module.c 2004-04-15 10:32:39.000000000 +1000 @@ -1003,6 +1003,8 @@ static int simplify_symbols(Elf_Shdr *se /* We compiled with -fno-common. These are not supposed to happen. */ DEBUGP("Common symbol: %s\n", strtab + sym[i].st_name); + printk("%s: please compile with -fno-common\n", + mod->name); ret = -ENOEXEC; break; -- Anyone who quotes me in their signature is an idiot -- Rusty Russell