The trick is to understand the code in grub itself.
In particular in grub/stage2/boot.c,
look at the function load_image().

  ....
  else if (flags & MULTIBOOT_AOUT_KLUDGE)
    {
      pu.mb = (struct multiboot_header *) (buffer + i);
      entry_addr = (entry_func) pu.mb->entry_addr;
      cur_addr = pu.mb->load_addr;
      /* first offset into file */
      grub_seek (i - (pu.mb->header_addr - cur_addr));
      /* If the load end address is zero, load the whole contents.  */
      if (! pu.mb->load_end_addr)
        pu.mb->load_end_addr = cur_addr + filemax;

....

Solaris 64 bit goes down this path to get
grub to load any kind of file (like elf64 unix) into
memory as a kernel and then just jump into it.
For Solaris (since build 57) the entry point is in the
32 bit dboot code.

Joe
 
 
This message posted from opensolaris.org
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to