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



_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to