__main?
Axel Kittenberger
Anshil@gmx.net
Fri Jan 26 02:28:00 GMT 2001
> How is GCC supposed to figure it out? main() *is* a special function
> in C. You aren't even allowed to take its address or to call it.
> Don't name a regular function main().
Possibly by -ffreestanding maybe? :o)
> Yep. On certain platforms, GCC arranges for main() to call __main(),
> that runs static initializers.
Okay if I create a __main that's empty the linker will be happy, right?
Hmmm gcc, did not protest when I called main();....
---------------------------------------------
Other question, is gcc capable of letting me switching sections, so like
I've some few global variables that I want to reside in a special section, or
some startup code witch is required to be on the first code page?
All I've found are the macros that allow me to tell gcc how to switch
sections if it decides to do so....
--
Sent through GMX FreeMail - http://www.gmx.net
More information about the Gcc-help
mailing list