i am trying to convert my obj kernel file into raw format using ld. This file has an externel referece to a boot asm file in starting of the code(kernel.c) which is asm("jmp initk"). i use the below command to do it
ld -Ttext=0x1000 -o kernel kernel.o -e 0x0
This works fine under my linux box. But when it comes to my windoze box(i use djgpp). It returns the error
<error>
kernel.o(.text+0x1):kernel.c: undefined reference to `initk'
</error>
Is there any way in windows that i can avoid ld from checking external references like it does in linux??
Please help!!!
ld ? under win2000
Re:ld ? under win2000
Maybe. But the obvious way to solve this would be to link in the file that contains initk, no?charisma wrote:Is there any way in windows that i can avoid ld from checking external references like it does in linux??
Re:ld ? under win2000
i tried to do that also. i compiled the asm file using nasm and tried all the possible supported format, but i get the unrecognized file format error from ld
Re:ld ? under win2000
In that case, make sure that NASM is outputting the right file format (you probably want to use -f coff if you're using DJGPP). Then you can put both .o files on the ld command line and link.
Re:ld ? under win2000
asm("jmp _initk") did the trick. .
Its working now.
Thanx for ur replies Tim.
Its working now.
Thanx for ur replies Tim.