using nasm with ld
Posted: Thu Jun 05, 2003 2:43 pm
Im a newbie os developer. Indeed my problem is just linking an asm and c files. I have asm-functions called from c file and c-functions called from asm file. I have following lines and following error.
nasm -f obj vole.asm -o vole.obj
gcc -ffreestanding -c main.c -o main.o
ld -i -Tlinker.ld -o mainvole.o vole.obj main.o
Linker Error:
vole.obj: file not recognized: File format not recognized
Im using djgpp for gcc and ld.
What may the correct lines be to link this two file?
nasm -f obj vole.asm -o vole.obj
gcc -ffreestanding -c main.c -o main.o
ld -i -Tlinker.ld -o mainvole.o vole.obj main.o
Linker Error:
vole.obj: file not recognized: File format not recognized
Im using djgpp for gcc and ld.
What may the correct lines be to link this two file?