Mail Archives: djgpp/2001/03/14/07:51:55
wmitty-no-spam AT cotse DOT com wrote:
[...]
> then try to link it as a pure binary file (so my bootloader can load it) as
> follows
> ld mytest.o -o mytest.bin -oformat binary -Ttext 0x100000 -lc
There's not anywhere enough stuff in that 'ld' command line for it to work.
Run an ordinary link via 'gcc -v' at least once, just to see what
things must be put together to make a successful link of a DJGPP
application. You need at least -lgcc and the crt0.o startup file, in
addition to -lc, and probably the linker script, too.
And that doesn't even begin to deal with the fact that even if you do
manage to do all this, the resulting binary file will still not work
in your planned startup environment. You *cannot* use most of DJGPP's
libc functions in a DOS- and DPMI-less environment like your own boot
loader, just like that. You'll effectively have to implement your own
libc, that means.
--
Hans-Bernhard Broeker (broeker AT physik DOT rwth-aachen DOT de)
Even if all the snow were burnt, ashes would remain.
- Raw text -