Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 27 Sep 2002 12:55:22 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 27 Sep 2002 12:55:20 -0400 Received: from w089.z209220022.nyc-ny.dsl.cnc.net ([209.220.22.89]:47888 "HELO yucs.org") by vger.kernel.org with SMTP id ; Fri, 27 Sep 2002 12:55:18 -0400 Subject: Re: using memset in a module From: Shaya Potter To: Dan Aloni Cc: "Randy.Dunlap" , linux-kernel@vger.kernel.org In-Reply-To: <20020927152033.GA4710@callisto.yi.org> References: <1033081345.3371.35.camel@zaphod> <20020927152033.GA4710@callisto.yi.org> Content-Type: text/plain Organization: Message-Id: <1033145995.6867.40.camel@zaphod> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.1.1.99 (Preview Release) Date: 27 Sep 2002 12:59:56 -0400 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1701 Lines: 49 the problem was I was trying to use some gcc specific behavior. i.e. char devpts[15] = "/dev/pts"; under 2.95 since memset isn't a builtin there has to be a reference to it, while under 2.96/3.2 there is a builtin, so there's no symbol needed. On Fri, 2002-09-27 at 11:20, Dan Aloni wrote: > On Thu, Sep 26, 2002 at 07:02:26PM -0400, Shaya Potter wrote: > > On Thu, 2002-09-26 at 18:51, Randy.Dunlap wrote: > > > On 26 Sep 2002, Shaya Potter wrote: > > > > > > | I have a problem using memset in a module. > > > | > [snio] > > > What gcc options are you using? > > > You need -O2 at least. > > > ^ upper-case letter O > > > > > > yes, using it. > > > > gcc -Wall -DMODULE -DMODVERSIONS -D__KERNEL__ -DLINUX -DEXPORT_SYMTAB > > -I/usr/src/linux/include/ -I`pwd`/../migration > > -I`pwd`/..//virtualization -O2 -fomit-frame-pointer -pipe > > -fno-strength-reduce -malign-loops=2 -malign-jumps=2 -malign-functions=2 > > -o fs1.o -c virtualizers/fs1.c > > Try adding -nostdinc. Prehaps memset is picked up as 'extern' somehow. > If that doesn't work, compile with -E instead of -c and grep the > preprocessing output for memset, that may give a clue. > > -- > Dan Aloni > da-x@gmx.net > - > 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/ - 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/