From owner-freebsd-hackers@FreeBSD.ORG Wed Mar 24 02:47:40 2010 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 5944F1065674 for ; Wed, 24 Mar 2010 02:47:40 +0000 (UTC) (envelope-from rysto32@gmail.com) Received: from ey-out-2122.google.com (ey-out-2122.google.com [74.125.78.25]) by mx1.freebsd.org (Postfix) with ESMTP id E45CF8FC0C for ; Wed, 24 Mar 2010 02:47:39 +0000 (UTC) Received: by ey-out-2122.google.com with SMTP id d26so495691eyd.9 for ; Tue, 23 Mar 2010 19:47:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=qDcUoy5YOi229Z2n+WyHnPf9s5y7bLnwJNtdiyKXYvA=; b=WS45vjDh8YHtpWLujE1yotyrwuAad3aC2LId/SCm7BwLZu2br1Xz3ANedXbPLPrtff Lmz8/vmLzKY1CSTQpYa76f/eRsD/Ejyieko1vW/71ZzAIZDn+tsUtUYHmdhnrgOhcaEV mR/6B480xqr/1crTSjrtm8H2XOennvNeO9rm4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=aXY7SRY2T9JK1v1EtQ4IpHM9nV5cBKXLbQZ7Z6Sj1yiuamJjAXBGOUy/ljdtPxp7Jd CAsPAj7bvkaeDZ+gN+R0B0iTKXOBVCeXLLNEmew3mkOtuaW5r+vDIAHTI+P2YhE0PJZ2 cvuj562/86rTuzWezTedPKvPN436OEzeV/iFk= MIME-Version: 1.0 Received: by 10.213.43.148 with SMTP id w20mr1336874ebe.52.1269398858841; Tue, 23 Mar 2010 19:47:38 -0700 (PDT) In-Reply-To: <4BA97A65.10507@mahan.org> References: <4BA97A65.10507@mahan.org> Date: Tue, 23 Mar 2010 22:47:38 -0400 Message-ID: From: Ryan Stone To: Patrick Mahan Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-hackers@freebsd.org Subject: Re: Using __attribute__((weak)) in the kernel 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: Wed, 24 Mar 2010 02:47:40 -0000 I severely doubt that the kernel linker supports that. I believe that the only way to accomplish what you're looking for is to leave function pointers in the kernel that you can call, and your module can change the function pointers at load/unload. Don't forget to have some kind of synchronization to prevent a function pointer from being called as it is being updated.