From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 22 01:07:36 2009 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id C30FB106566C for ; Thu, 22 Jan 2009 01:07:36 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: from yw-out-2324.google.com (yw-out-2324.google.com [74.125.46.29]) by mx1.freebsd.org (Postfix) with ESMTP id 72E768FC0A for ; Thu, 22 Jan 2009 01:07:36 +0000 (UTC) (envelope-from kabaev@gmail.com) Received: by yw-out-2324.google.com with SMTP id 9so1671691ywe.13 for ; Wed, 21 Jan 2009 17:07:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:date:from:to:cc:subject :message-id:in-reply-to:references:x-mailer:mime-version :content-type; bh=0J8GJP1WD1+6KCQYneZGEZmZ49Y51uDvJuqDJ6v2KEo=; b=cyB708DuDjHEFqHAJKccBccQDJcg74npQuHAcDnxgGCUMvyBCqJlEDivu3kYH0aX5o 0ou8234vChCiqvCT2eFz1CpiFLRIM+EpwMJ1rAoJWBgG17iUbk2qEfpS1mKRzz6CTx68 4w5g/JiQjQdii7K1GQCY/9RAdnt22wuQbrejU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=date:from:to:cc:subject:message-id:in-reply-to:references:x-mailer :mime-version:content-type; b=snGog6YKcfJl83QanUqFBe+781vFQYkNNApoSO+xUsrIC9PviRLmJOJwtWF9/JuyPq wStP1PCXNyURWMqtm9jzei7CWz8Ko1VDpf5h9zQEZr7KRq6ZiZ5lcc8Z+yYjpvURs52i VUJgBMKdddNogXFLn0xEzkIPIyuu0gYNB3bno= Received: by 10.151.111.1 with SMTP id o1mr6094162ybm.28.1232586455638; Wed, 21 Jan 2009 17:07:35 -0800 (PST) Received: from kan.dnsalias.net (c-98-217-224-113.hsd1.ma.comcast.net [98.217.224.113]) by mx.google.com with ESMTPS id k49sm17276200rnd.13.2009.01.21.17.07.34 (version=SSLv3 cipher=RC4-MD5); Wed, 21 Jan 2009 17:07:35 -0800 (PST) Date: Wed, 21 Jan 2009 20:07:30 -0500 From: Alexander Kabaev To: Andrew Brampton Message-ID: <20090121200730.121e3e28@kan.dnsalias.net> In-Reply-To: References: <4977B357.2080500@andric.com> <20090121185245.00739316@kan.dnsalias.net> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: multipart/signed; boundary="Sig_/x87sEwRtdH4Y5Qwu25Wxzy0"; protocol="application/pgp-signature"; micalg=PGP-SHA1 Cc: freebsd-hackers@freebsd.org Subject: Re: Kernel Module - GCC Requires memmove X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 22 Jan 2009 01:07:37 -0000 --Sig_/x87sEwRtdH4Y5Qwu25Wxzy0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On Thu, 22 Jan 2009 00:52:13 +0000 Andrew Brampton wrote: > 2009/1/21 Alexander Kabaev : > > 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'. > > > > > > We do not provide all necessary functions in kernel and mostly > > depend on luck for the kernel to link. Your luck apparently ran > > out :( > > >=20 > 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? >=20 > 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. --=20 Alexander Kabaev --Sig_/x87sEwRtdH4Y5Qwu25Wxzy0 Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (FreeBSD) iD8DBQFJd8bSQ6z1jMm+XZYRAqe8AJ9lbnx3zcxJ58dtMeqr8KF1THYpIACghpaO AaDOBgvg5O79LmHt3PrB7V4= =VVG0 -----END PGP SIGNATURE----- --Sig_/x87sEwRtdH4Y5Qwu25Wxzy0--