i downloaded 3 files from this site namely, the c++ kerenl file, the bootloader file and the linker script. the files compiled without any problem. but while linking i am getting an eror as follows " undefined reference to _main"
could anyone please tell why i am geetingthat error and how to rectify it.
linker error
RE:linker error
That simply means there is no main() function in the object files you're linking together. Since you didn't write this yourself, I would gather that you're not supplying the right arguments when linking. Can you give any more information?
Gnome
Gnome
RE:linker error
hi gnome,
the bootloader calls a asm file say myprg.asm
this myprg.asm has a call to function main() as follows:call _main
this main() is present in a c prgram say ker.c.
and both files(myprg.asm and ker.c)compile without any problem
but when i link it as
ld -T link.ld -o hello.bin myprg.o ker.o
it flags an error saying "undefined reference to _main"
pls help me solve this problem
the bootloader calls a asm file say myprg.asm
this myprg.asm has a call to function main() as follows:call _main
this main() is present in a c prgram say ker.c.
and both files(myprg.asm and ker.c)compile without any problem
but when i link it as
ld -T link.ld -o hello.bin myprg.o ker.o
it flags an error saying "undefined reference to _main"
pls help me solve this problem