ref: dff266766cc5bf90588760734851b7ac636b5a6f
parent: ac203f5f6a5a74025b8a1466ead6f8250bb27e9b
author: Ori Bernstein <[email protected]>
date: Tue May 27 20:15:22 EDT 2014
OSX start does the same thing. Add the same comment.
--- a/libstd/start-osx.s
+++ b/libstd/start-osx.s
@@ -68,6 +68,16 @@
.cvtdone:
ret
+/*
+ * The entry point for the whole program.
+ * This is called by the OS. In order, it:
+ * - Sets up all argc entries as slices
+ * - Sets up all envp entries as slices
+ * - Converts argc/argv to a slice
+ * - Stashes envp in std._environment
+ * - Stashes a raw envp copy in __cenvp (for syscalls to use)
+ * - Calls main()
+ */
.globl start
start:
/* turn args into a slice */