From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Woodhouse Subject: Re: buffer cache Date: Sun, 14 Sep 2003 11:37:22 +0100 Sender: linux-fsdevel-owner@vger.kernel.org Message-ID: <1063535842.11431.44.camel@imladris.demon.co.uk> References: <20030913102721.GB31719@vagabond> <20030913172836.GE31719@vagabond> <1063531965.11431.28.camel@imladris.demon.co.uk> <20030914100351.GG31719@vagabond> Mime-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Cc: linux-fsdevel@vger.kernel.org Return-path: Received: from imladris.demon.co.uk ([193.237.130.41]:36243 "EHLO imladris.demon.co.uk") by vger.kernel.org with ESMTP id S262361AbTINKhY (ORCPT ); Sun, 14 Sep 2003 06:37:24 -0400 To: Jan Hudec In-Reply-To: <20030914100351.GG31719@vagabond> List-Id: linux-fsdevel.vger.kernel.org Please don't drop me from the recipients when replying; it's very rude. On Sun, 2003-09-14 at 12:03 +0200, Jan Hudec wrote: > > Probably as a result of hacking up his own broken makefiles instead of > > make -C $KERNELDIR SUBDIRS=`pwd` modules > > Well, I wrote a module to compile off-tree. The correct command to link > a module is: > ld -r -o .o No, that's not always correct. It's completely wrong for 2.6, of course -- and even for 2.4, if building modules for a 64-bit kernel, you may find your userspace is 32-bit by default and you need something like -melf64_sparc on the linker command line. The kernel makefiles get this right. Use them. The kernel is also free to screw with its own internal ABI all it likes -- with cflags affecting global register usage, etc. You must do as it does in the kernel you happen to be building -- which basically means you must use the kernel build system. The correct way to build modules out of the kernel tree is to use the kernel makefiles and override SUBDIRS to point at your own directory; it's been that way since 2.0 if not earlier. -- dwmw2