Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Mar 2005 19:15:02 -0800
From:      Sean McNeil <sean@mcneil.com>
To:        Vinod Kashyap <vkashyap@amcc.com>
Cc:        freebsd-amd64@freebsd.org
Subject:   RE: undefined reference to `memset'
Message-ID:  <1111720502.42823.4.camel@server.mcneil.com>
In-Reply-To: <IDW0FY04.5SV@hadar.amcc.com>
References:  <IDW0FY04.5SV@hadar.amcc.com>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?1111720502.42823.4.camel>