Date: Wed, 21 Jan 2009 17:14:44 -0800 (PST) From: Nate Eldredge <neldredge@math.ucsd.edu> To: Andrew Brampton <brampton+freebsd-hackers@gmail.com> Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel Module - GCC Requires memmove Message-ID: <Pine.GSO.4.64.0901211712010.18030@zeno.ucsd.edu> In-Reply-To: <d41814900901211652y617be9afp253a9f1a002c537b@mail.gmail.com> References: <d41814900901210412h4a1aaec6l6945dd79d07d13be@mail.gmail.com> <4977B357.2080500@andric.com> <20090121185245.00739316@kan.dnsalias.net> <d41814900901211652y617be9afp253a9f1a002c537b@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 22 Jan 2009, Andrew Brampton wrote: > 2009/1/21 Alexander Kabaev <kabaev@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? Possibly because the kernel is usually compiled with optimization, in which case the compiler presumably generates inline code for these functions. I vaguely recall Linux having a policy that compiling the kernel without optimization was not supported, possibly because of situations like this. -- Nate Eldredge neldredge@math.ucsd.edu
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.GSO.4.64.0901211712010.18030>
