This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Undefined references to 'memcpy' when compiling Linux Kernel
"H . J . Lu" wrote:
> On Fri, Jun 16, 2000 at 06:38:23PM -0400, Jeff Garzik wrote:
> > Jeff Garzik wrote:
> > > Use struct_copy...
> > oops, make that struct_cpy...
> We have to make sure mem functions won't be generated by gcc anywhere
> in the ia32 kernel. Otherwise, it will be hard to get modules to work
> with symbol versioning since gcc generates those calls after C
> preprocessing. Or we can export those mem functions from kernel
> unversioned regardless if symbol versioning is enabled or not.
>
> It will be really nice for gcc to inline them like all the previous
> versions and/or have a flag to force gcc to issue a warning when mem
> functions are generated.
struct_cpy is a macro (at least on x86), so it should be easy to put
special inlining or other compiler rules in there... or make it a macro
which points to static inline __struct_cpy. Having the code use
struct_cpy for these cases allows fine tuning of this particular case.
Jeff
--
Jeff Garzik |
Building 1024 | Free beer tomorrow.
MandrakeSoft, Inc. |