Mail Archives: djgpp/1999/10/05/07:44:58
I know about headers and stuff, but I'm writing my os to a plain binary file
(no header or anything that even looks like it). So I _really_ need a way
to know the size of the entire binary at link time, so my loader which is
a part of the binary itself, knows how many bytes to load from disk. I don't
want to patch the binary later.
But maybe somebody knows another way of doing this? All thoughts are welcome.
David
Eli Zaretskii (eliz AT is DOT elta DOT co DOT il) wrote:
: On Sat, 2 Oct 1999 Fokkema DOT DBRA AT delorie DOT com wrote:
: > You helped me very much with my far pointer problem (thank you all) so here
: > is another question: for my os, I link a loader along with it at the start
: > of the binary image. So on booting the floppy, the loader takes over and has
: > to load the entire kernel from disc. But how can the loader know the size of
: > the entire kernel?
: The size of every section is usually recorded in the header of the
: binary file. Each binary file format has its own way of recording
: this information; check out the `size' program from GNU Binutils which
: reports the size of each section.
- Raw text -