I would like to use some the functions given by libc at the boot loader stage itself. Is it possible to get them at that stage of loading?
|
You'll most likely have to write your own versions of the functions you want, though in some cases you may be able to use libc source code as a starting point. The functions in libc itself are written under all the assumptions of a UNIX userspace program, including:
and at the bootloader stage, you have none of these. Instead, (by default, under Intel) you've got the BIOS, a segmented memory model, no memory protection, and full reign of the machine. It's the same reason you see the custom |
|||
|
|
|
Yes. The easiest way would be to copy the code you need to the boot loader. Which functions are these? You should understand that you can't use them if they rely on system calls to fulfill their duty. |
|||