From: Hans-Bernhard Broeker Newsgroups: comp.os.msdos.djgpp Subject: Re: Linking to binary format Date: 14 Mar 2001 11:36:17 GMT Organization: Aachen University of Technology (RWTH) Lines: 24 Message-ID: <98nl3h$dh1$1@nets3.rz.RWTH-Aachen.DE> References: <984559248 DOT 3aaf2e90465a3 AT webmail DOT cotse DOT com> NNTP-Posting-Host: acp3bf.physik.rwth-aachen.de X-Trace: nets3.rz.RWTH-Aachen.DE 984569777 13857 137.226.32.75 (14 Mar 2001 11:36:17 GMT) X-Complaints-To: abuse AT rwth-aachen DOT de NNTP-Posting-Date: 14 Mar 2001 11:36:17 GMT Originator: broeker@ To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com 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.