Re: Undefined references to 'memcpy' when compiling Linux Kernel

From: Jeff Garzik (jgarzik@mandrakesoft.com)
Date: Fri Jun 16 2000 - 18:01:56 EST


"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.       |

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.rutgers.edu Please read the FAQ at http://www.tux.org/lkml/



This archive was generated by hypermail 2b29 : Fri Jun 23 2000 - 21:00:13 EST