Re:Microsoft introduces Universal Windows apps
by makomk on Wednesday April 02, 2014 @05:03PM
(#7518988)
Come to think of it, I don't think I've used any platform where main() is the real entry point to the executable. On Linux the real entry point is _start, all of the bare-metal embedded stuff I've touched does a whole bunch of hardware setup in crt0 before it calls main(), etc...
Re:Microsoft introduces Universal Windows apps
by astrange on Wednesday April 02, 2014 @06:36PM
(#7519546)
main() is the entry point function in newer OS X versions. Why ship crt0 in everything when you can put it in dyld?
Re:Microsoft introduces Universal Windows apps
by derefr on Wednesday April 02, 2014 @08:32PM
(#7520048)
crt0 would still get linked into static binaries in OSX, I presume.
Re:Microsoft introduces Universal Windows apps
by nknighthb on Wednesday April 02, 2014 @09:49PM
(#7520401)
What static binaries would those be?
https://developer.apple.com/library/mac/qa/qa1118/_index.htm...
And while we're on implementation details, please note that most UNIX platforms do not start at main either. Most platforms include some soft of crt0 that must be linked which contains the real entry point. The dynamic linker will also run code prior to main.
But the C standard only defines what the environment looks like when execution begins and makes no statement on what might run before or how the program got into memory in the first place.