From owner-freebsd-hackers@FreeBSD.ORG Thu Jan 22 00:52:15 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 87A5A1065673 for ; Thu, 22 Jan 2009 00:52:15 +0000 (UTC) (envelope-from brampton@gmail.com) Received: from fk-out-0910.google.com (fk-out-0910.google.com [209.85.128.187]) by mx1.freebsd.org (Postfix) with ESMTP id 1256B8FC0A for ; Thu, 22 Jan 2009 00:52:14 +0000 (UTC) (envelope-from brampton@gmail.com) Received: by fk-out-0910.google.com with SMTP id f40so502030fka.11 for ; Wed, 21 Jan 2009 16:52:14 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to:cc :content-type:content-transfer-encoding; bh=pqsPVBXJy/Wq6cIEkPLz8spV0NMUZz5T/IKngpF/E6s=; b=tRsLuea2glsyHzd8IUFQ5uBylD+l2bxk3bL5b6VdnE+z8+zrXGX8GRY2GQ51moyQNf EJatD7eOOOEk1/m4a0yzf73JPtlvmVfKlcIGy1LJJ9SlLJSoHujocjMj+aoC1uTjnaEN KGhmh3hJrCgAiyTx1bqkbbhCZuhWWp+nzz4oA= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; b=kqJj/okI5EcN+LkxdunM8tgp6FBsUpjN5OmyOIjQ3ynm6xH+/QFw5Gba3JgVsBAMQT 5t1HDgbEDyCwJYgjrMuyaFagk8AOgTN3mH2ZxPIPYC5R+g3D7yS6SNjV/8/q/VFDFI8M FEm6pVPCBKXLgWbmb/aSv+PIYzxGuzekm+rQs= MIME-Version: 1.0 Sender: brampton@gmail.com Received: by 10.223.103.207 with SMTP id l15mr2929344fao.2.1232585533946; Wed, 21 Jan 2009 16:52:13 -0800 (PST) In-Reply-To: <20090121185245.00739316@kan.dnsalias.net> References: <4977B357.2080500@andric.com> <20090121185245.00739316@kan.dnsalias.net> Date: Thu, 22 Jan 2009 00:52:13 +0000 X-Google-Sender-Auth: 86dc5910537cd8c1 Message-ID: From: Andrew Brampton To: Alexander Kabaev Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit 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 00:52:15 -0000 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 :( > 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