|
From: | Christian Franke |
Subject: | Re: [PATCH] framework for building modules externally |
Date: | Wed, 05 Nov 2008 07:57:38 +0100 |
User-agent: | Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 SeaMonkey/1.1.11 |
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
[Prev in Thread] | Current Thread | [Next in Thread] |