Page 1 of 1

Calling c program from bootloader

Posted: Sun Apr 04, 2004 11:00 pm
by yogie_cs
i have the foll problem
A 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

RE:Calling c program from bootloader

Posted: Sun Apr 04, 2004 11:00 pm
by common
try just call main