the dam djgpp ___main
Posted: Wed Apr 17, 2002 11:00 pm
Hello
when i compile a .c file, the asm code generated
call a ___main function.
it seems that djgpp call a ___main function into my
main function to initialize something.
anibody knows how to erase it.
what switches do i have to use?
i'm doing my bootloader and when i link the file with
ld i get unresolved references to ___main
WHAT ___MAIN!!!!!!!!!!.
dam!!!!!.
could you help me?, please!!!.
My code:
int main(void) {
return(0)
}
i compile this way
gcc -Wall -S -o nothing.s nothing.c to view the assembler code
gcc -Wall -c -o nothing.o nothing.c to link with ld
i link this way
ld nothing.o
i have tried with gcc -fno-stdlibs but nothing changes
when i compile a .c file, the asm code generated
call a ___main function.
it seems that djgpp call a ___main function into my
main function to initialize something.
anibody knows how to erase it.
what switches do i have to use?
i'm doing my bootloader and when i link the file with
ld i get unresolved references to ___main
WHAT ___MAIN!!!!!!!!!!.
dam!!!!!.
could you help me?, please!!!.
My code:
int main(void) {
return(0)
}
i compile this way
gcc -Wall -S -o nothing.s nothing.c to view the assembler code
gcc -Wall -c -o nothing.o nothing.c to link with ld
i link this way
ld nothing.o
i have tried with gcc -fno-stdlibs but nothing changes