Kernel Module - GCC Requires memmove
Alexander Kabaev
kabaev at gmail.com
Wed Jan 21 17:07:37 PST 2009
On Thu, 22 Jan 2009 00:52:13 +0000
Andrew Brampton <brampton+freebsd-hackers at gmail.com> wrote:
> 2009/1/21 Alexander Kabaev <kabaev at gmail.com>:
> > From GCC's info pages:
> >
> > Most of the compiler support routines used by GCC are present in
> > `libgcc', but there are a few exceptions. GCC requires the
> > freestanding environment provide `memcpy', `memmove', `memset' and
> > `memcmp'.
> > </end quote>
> >
> > We do not provide all necessary functions in kernel and mostly
> > depend on luck for the kernel to link. Your luck apparently ran
> > out :(
> >
>
> Thanks for the info, good thing I'm not a gambling man. Anyway I also
> read that part of the GCC manual, so my next question is: If code can
> be generated with those four functions, why are they not exported by
> the kernel? Surely another kernel module will at some point also be
> hit by this?
>
> thanks
> Andrew
Very good question and the answer is simple: we do not export these
functions because nobody needed them yet :) Historically we have grown
these functions on an 'as needed' basis.
I am sure the patch to add missing functions would get committed if it
were made available. <hint>
--
Alexander Kabaev
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20090122/507e7bd1/signature.pgp
More information about the freebsd-hackers
mailing list