I am making a simple operating System in C, (from scratch)
I use a Loader.asm and a bootload.asm file for Loading my OS.
kmain.c contains the basic kernel functions
and print.c contains the int main(void) function that prints some text
on screen.
I compile ALL the files together using this batch script :
REM buildall.bat
REM By Sids123 (ALLDESP) on CodePlex.com
REM Builds everything and copies it to an OS.img file
@echo off
@echo Building Main Files
gcc -ffreestanding -fno-builtin -nostdlib -c *.c
nasm -f aout Loader.asm -o Loader.o
ld -Ttext 0x1000 -o kernel.bin Loader.o kmain.o print.o
nasm -f bin bootload.asm -o bootload.bin
@echo Copying Files to OS.img
copy /b bootload.bin + kernel.bin os.img
echo Done!!!
pause
But ld is not able to copy .o files to generate a kernel.bin
I get the following Message by Ld.exe
Loader.o File not recognized : File Format no recognized
Any Solutions to this,
Help would be appreciated,
~Sids123