From owner-freebsd-amd64@FreeBSD.ORG Fri Mar 25 03:15:03 2005 Return-Path: Delivered-To: freebsd-amd64@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F0E1D16A4CE; Fri, 25 Mar 2005 03:15:03 +0000 (GMT) Received: from mail.mcneil.com (mcneil.com [24.199.45.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id B021143D1D; Fri, 25 Mar 2005 03:15:03 +0000 (GMT) (envelope-from sean@mcneil.com) Received: from localhost (localhost.mcneil.com [127.0.0.1]) by mail.mcneil.com (Postfix) with ESMTP id 67BF3F3F44; Thu, 24 Mar 2005 19:15:03 -0800 (PST) Received: from mail.mcneil.com ([127.0.0.1]) by localhost (server.mcneil.com [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 42082-03; Thu, 24 Mar 2005 19:15:02 -0800 (PST) Received: from mcneil.com (mcneil.com [24.199.45.54]) by mail.mcneil.com (Postfix) with ESMTP id 70735F3F0E; Thu, 24 Mar 2005 19:15:02 -0800 (PST) From: Sean McNeil To: Vinod Kashyap In-Reply-To: References: Content-Type: text/plain Date: Thu, 24 Mar 2005 19:15:02 -0800 Message-Id: <1111720502.42823.4.camel@server.mcneil.com> Mime-Version: 1.0 X-Mailer: Evolution 2.2.1.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit X-Virus-Scanned: by amavisd-new at mcneil.com cc: Peter Jeremy cc: freebsd-stable@freebsd.org cc: freebsd-amd64@freebsd.org Subject: RE: undefined reference to `memset' X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Mar 2005 03:15:04 -0000 Vinod, On Thu, 2005-03-24 at 19:01 -0800, Vinod Kashyap wrote: > Just like the problem is not seen when I build only the module, it's > not seen if I simply write a foo.c (with the example code) and compile it. > That's the reason I posted the patch to /sys/dev/twa/twa.c, which would > cause the problem if applied, and then followed with a kernel build. > I can send the result of running nm on twa.o tomorrow. Please take a look at other messages in this thread, like some of the ones I have posted. They clearly show your problem in a small example and how it is happening in the -O2 case as memset is being optimized away. -O would appear to do the right thing and adding -minline-all-stringops (at either optimization level) would produce even better code. Cheers, Sean