I have a assembly file and a c file compiled to .o files (start.o and main.o) and is trying to link them with ld. I'm using this command:
ld -T link.ld -o kernel.bin start.o main.o
where link.ld is a linker script, but when I run it, i get this error:
start.o:start.o:(.text+0x2d): undefined reference to `_main'
in the assembly file, I call the c file with this function:
stublet:
extern _main
call _main
jmp $
Anybody can see what's wrong?