using memset in a module

Shaya Potter
2002-09-26T22:44:47Z

I have a problem using memset in a module.

I've tried including <linux/string.h> or <asm/string.h> but whenever I
compile with gcc 2.95, the resulting object has memset being an
undefined symbol. When I compile with gcc-3.2 it works right as is
inline in the code and there's no symbol.

has anyone seen this b4? Is this a gcc bug? a kernel header bug? a bug
in my coding (i.e. does one have to do anything else besides include
<linux or asm/string.h> or have special gcc cmd line options that are
different from whats normally needed for a module).

if it matters, I'm using the debian gcc's

spotter@zaphod:~/cvs/zap/virtualization$ gcc -v
Reading specs from /usr/lib/gcc-lib/i386-linux/2.95.4/specs
gcc version 2.95.4 20011002 (Debian prerelease)

and (cutting the cruft)
gcc version 3.2.1 20020924 (Debian prerelease)

thanks,

shaya potter (tearing his hair out)