Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756895AbXFLR7M (ORCPT ); Tue, 12 Jun 2007 13:59:12 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1754816AbXFLR7A (ORCPT ); Tue, 12 Jun 2007 13:59:00 -0400 Received: from pasmtpa.tele.dk ([80.160.77.114]:50253 "EHLO pasmtpA.tele.dk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754534AbXFLR67 (ORCPT ); Tue, 12 Jun 2007 13:58:59 -0400 Date: Tue, 12 Jun 2007 20:00:02 +0200 From: Sam Ravnborg To: Satyam Sharma Cc: Jan Beulich , Venkatesh Pallipadi , Andi Kleen , linux-kernel@vger.kernel.org, patches@x86-64.org Subject: Re: [PATCH] x86: fix improper .init-type section references Message-ID: <20070612180002.GC15329@uranus.ravnborg.org> References: <466E6BDF.76E4.0078.0@novell.com> <466EB12B.76E4.0078.0@novell.com> <466EC08A.76E4.0078.0@novell.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.4.2.1i Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1418 Lines: 32 On Tue, Jun 12, 2007 at 07:39:30PM +0530, Satyam Sharma wrote: > On 6/12/07, Jan Beulich wrote: > >>> And from a purely theoretical > >>> perspective I don't think such references should be considered bad - > >>> .exit.* should be discarded together with .init.* if unloading is > >>> impossible (built-in or configured off), not before module/kernel > >>> initialization. > >> > >>Hmm, but that's not how things are, presently. __exit marked > >>functions are simply not linked into the kernel (when that module > >>is being built-in) at all -- this "discard" happens at _build time_ > >>(to save on kernel image size). > > > >Not really, at least not for i386 and x86-64 - see their vmlinux.lds.S > >files. > > For those archs, yes, you're right that modpost should be > special-casing (based on arch) before complaining for > .init -> .exit references. No. References from __init to __exit is wrong independent on architecture. powerpc discards them at buildtime, i386 at runtime. So for the latter we will have an oops where we for the first have a build time failure. It is better to let modpost warn always - independent on architecture. Sam - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/