Thank all of you for your input. Things start to make sense.

I understand now that OpenSolaris sets grub's flag bit 16 which instructs the loader to use custom load addresses instead of those provided in the elf image format. By setting that bit, grub assumes that the current executable is not an elf image but rather something else (like a.out).

The addresses that are really being used are these: http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/uts/i86pc/dboot/dboot_grub.s#59

And here is where elfpatch comes. The comments say that a binary utility (elfextract maybe??) rewrites the mb_header. I have looked into http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/tools/elfextract/elfextract.c but i don't understand what it does exactly. What does "Extract the PT_LOAD bits and format them into a .s" mean?

I would really appreciate a few more pointers.

Thanks a lot for your help!


Regards,
Constantine
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code

Reply via email to