Follow-up Comment #2, bug #22750 (project grub):

I'm sorry i get confused. In fact, grub_mod_init is defined in biosdisk.c.
GRUB_MOD_INIT will expand to:

static void grub_mod_init (grub_dl_t mod __attribute__ ((unused)))
__attribute__ ((used));

void grub_biosdisk_init (void);

void grub_biosdisk_init (void) { grub_mod_init (0); }

static void grub_mod_init (grub_dl_t mod __attribute__ ((unused)))
{
 // INIT function
}

grub_mod_init is private so that it won't conflict with other module, but
it's stored in the object file, you can verify it with nm:

nm biosdisk.mod

mod-biosdisk.c is used to put the module name and dependence in the output
file, so that the loader can load them automatically.


    _______________________________________________________

Reply to this item at:

  <http://savannah.gnu.org/bugs/?22750>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.gnu.org/



_______________________________________________
Bug-grub mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/bug-grub

Reply via email to