From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1KxcKp-0006aa-ML for mharc-grub-devel@gnu.org; Wed, 05 Nov 2008 01:57:47 -0500 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KxcKn-0006a4-1D for grub-devel@gnu.org; Wed, 05 Nov 2008 01:57:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KxcKl-0006Zs-Mn for grub-devel@gnu.org; Wed, 05 Nov 2008 01:57:44 -0500 Received: from [199.232.76.173] (port=54673 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KxcKl-0006Zp-JM for grub-devel@gnu.org; Wed, 05 Nov 2008 01:57:43 -0500 Received: from mailout04.t-online.de ([194.25.134.18]:40572) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KxcKl-0002U7-53 for grub-devel@gnu.org; Wed, 05 Nov 2008 01:57:43 -0500 Received: from fwd02.aul.t-online.de by mailout04.sul.t-online.de with smtp id 1KxcKi-0001X7-00; Wed, 05 Nov 2008 07:57:40 +0100 Received: from [10.3.2.2] (VmpxPqZBZhShwqtiDfvT8kaDES4MaMnv46L3jU3vvdD6PWLiTvKkd6966pCQQhAZhY@[217.235.239.193]) by fwd02.aul.t-online.de with esmtp id 1KxcKg-1E064m0; Wed, 5 Nov 2008 07:57:38 +0100 Message-ID: <491143E2.4040705@t-online.de> Date: Wed, 05 Nov 2008 07:57:38 +0100 From: Christian Franke User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11 MIME-Version: 1.0 To: The development of GRUB 2 References: <20081101123229.GA14438@thorin> <20081101190204.GB4639@thorin> <49109AB8.4010509@nic.fi> <20081104190751.GA25519@thorin> <49109EE7.6050406@nic.fi> <20081104193911.GA26419@thorin> In-Reply-To: <20081104193911.GA26419@thorin> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-ID: VmpxPqZBZhShwqtiDfvT8kaDES4MaMnv46L3jU3vvdD6PWLiTvKkd6966pCQQhAZhY X-TOI-MSGID: 69dd7390-c83f-443b-a0da-ebbd10768fef X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 3) Subject: Re: [PATCH] framework for building modules externally X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Nov 2008 06:57:45 -0000 Robert Millan wrote: >> ... >> How do you treat differences in ABI ? >> >> Dis-allow loading of module with different value of ABI ? Or were you >> planning that module itself adapts to different versions of GRUB 2 ABI's? >> > > The module itself could: > > GRUB_MOD_INIT(foo) > { > if (grub_abi != GRUB_ABI) > { > grub_printf ("abi mismatch!\n"); > return; > } > > /* register our commands/terminals/disks/whatever */ > } > > Alternative: Export a symbol describing the ABI version in kernel ("grub_abi_3_14"). Access this symbol in each module (this can be hidden in GRUB_MOD_INIT). Then loading a module with wrong ABI version fails due to undefined symbol. -- Christian Franke