Page 1 of 1

Serious Linker Problems!!

Posted: Wed Jan 02, 2002 7:30 pm
by anteatereat
I have written a plain kernel and compiled it with gcc. Now All i want to do is link it to a plain binary file that i can load.
I am developing in a windows 98 environment and tryed using ld but it spewed with a page fault when ever i specify the binary option. I had a look at jloc but just couldnt get how it works. Can somebody please give me some advice or tell me if theres another linker out there, THANKS.

Re: Serious Linker Problems!!

Posted: Mon Jan 07, 2002 5:34 pm
by DruG5t0r3
if you want to link into a plain binary with gcc you need to code you're own 32-bit loader (protected mode) in for example load.asm and then use this command line in ld

ld -o kernel.com --oformat binary -Ttext=0x0 load.o kernel.o /djgpp/lib/libc.a

i had this problem too i wasn't able to link all my .o files because the command line of ld changed maybe....i'd say 4 months ago ;D