compiler and linker problem
Posted: Mon Jun 27, 2005 11:00 pm
On my Windows box i have djgpp gcc version 3.1 and ld version 2.13. Using that my kernel compiles just fine. But on my Linux box with gcc 4.0.0 and ld 2.16.1 it gives me an error saying:
kstart.o:kstart.o:(.text+0x21): undefined reference to '_main'
The code on both computers is the same. In kstart.asm I have
...
[extern _main]
call _main
...
This way works in Windows. If I take out the underscores it compiles fine under Linux but the kernel is messed up. The file kernel.bin is just a plain text file. How do I go about fixing this?
Thanks
kstart.o:kstart.o:(.text+0x21): undefined reference to '_main'
The code on both computers is the same. In kstart.asm I have
...
[extern _main]
call _main
...
This way works in Windows. If I take out the underscores it compiles fine under Linux but the kernel is messed up. The file kernel.bin is just a plain text file. How do I go about fixing this?
Thanks