Serious Linker Problems!!

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
anteatereat

Serious Linker Problems!!

Post 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.
DruG5t0r3

Re: Serious Linker Problems!!

Post 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
Post Reply