Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756186AbZAAHNA (ORCPT ); Thu, 1 Jan 2009 02:13:00 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751415AbZAAHMv (ORCPT ); Thu, 1 Jan 2009 02:12:51 -0500 Received: from gw.goop.org ([64.81.55.164]:46178 "EHLO mail.goop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751083AbZAAHMu (ORCPT ); Thu, 1 Jan 2009 02:12:50 -0500 Message-ID: <495C6CE9.3080402@goop.org> Date: Thu, 01 Jan 2009 18:12:41 +1100 From: Jeremy Fitzhardinge User-Agent: Thunderbird 2.0.0.18 (X11/20081119) MIME-Version: 1.0 To: Linus Torvalds CC: Helge Deller , Rusty Russell , linux-parisc , Linux Kernel Development , Kyle McMartin , Randolph Chung , Andrew Morton , Sam Ravnborg , John David Anglin Subject: Re: [PATCH] parisc: fix module loading failure of large kernel modules (take 4) References: <4959346E.7060600@gmx.de> <200812310915.41693.rusty@rustcorp.com.au> <495B5806.3080505@gmx.de> In-Reply-To: X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1267 Lines: 25 Linus Torvalds wrote: > Some gcc versions will inline weak functions if they are in scope - even > if there is a non-weak function somewhere else. So you MUST NOT have the > weak definition in the same file (or indirectly called through some inline > functions in a header file) as the call. Because if you do, then any user > with the wrong version of gcc will get the weak function semantics, even > if it was meant to be overridden by something else. > Yes. I think this behaviour is considered to be desperately broken by the gcc developers and has been fixed in all recent gccs. There are a couple of broken versions, and there have been patches floating around to just refuse to use them; otherwise __weak is effectively unusable. (Ah, I see Adrian has posted it again and everyone agrees with it.) On the other hand, I have seen a couple of instances of "inline __weak" which is insane, but I don't know if gcc does anything crazy with it, or if its common enough to bother warning about. J -- 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/