The MultiBoot startup code in the OSKit has two components. The first component is contained in the object file multiboot.o, installed by the toolkit in the prefix/lib/oskit/ directory. This object file contains the actual MultiBoot header and entrypoint; it must be linked into the kernel as the very first object file, so that its contents will be at the very beginning of the resulting executable. (This object file takes the place of the crt0.o or crt1.o normally used when linking ordinary applications in a Unix-like system.) The second component is contained in the libkern.a library; it contains the rest of the MultiBoot startup code as well as various utility routines for the use of the client OS.
XXX diagram of MultiBoot kernel executable image
The toolkit's MultiBoot startup code will work when using either ELF or a.out format. ELF is the format recommended for kernel images by the MultiBoot standard; however, the a.out format is also supported through the use of some special header information embedded in the multiboot.o code linked at the very beginning of the kernel's text segment. This information allows the MultiBoot boot loader to determine the location and sizes of the kernel's text, data, and bss sections in the kernel executable without knowing the details of the particular a.out flavor in use (e.g., Linux, NetBSD, FreeBSD, Mach, VSTa, etc.), all of which are otherwise mutually incompatible.