[coyotos-dev] Looking for ideas - image loading
Neal H. Walfield
neal at walfield.org
Tue Jan 29 12:03:06 EST 2008
At Tue, 29 Jan 2008 11:14:24 -0500,
Jonathan S. Shapiro wrote:
> On Tue, 2008-01-29 at 11:03 -0500, Godfrey Vassallo wrote:
> > How about "CAT"ing the individual files and then setting the entry
> > address in the multiboot header to the module that understands how the
> > file was put together and what to do with it? In this way the loader
> > has no knowledge of the construction process and believes its dealing
> > with one file. Additional formatting information (e.g., elf ) could be
> > used by the embedded module.
> This would work if the loaded file was in some "raw" format.
> Unfortunately, the multiboot and lilo loaders all assume that they are
> loading a binary image. They don't simply copy the file blindly. They
> instead crack open the file and interpret the proper load addresses
> using the ELF program (a.k.a. segment) headers.
> So in order for this to work with multiboot loaders, we need to get the
> mkimage shoved into a loadable segment.
I think you want GAS' .incbin directive.
More information about the coyotos-dev