ref: ac203f5f6a5a74025b8a1466ead6f8250bb27e9b
parent: 9d8c86eb077b22081a2abc1a8823907d1972bd88
author: Ori Bernstein <[email protected]>
date: Tue May 27 20:14:52 EDT 2014
Comment what start-linux.s does
--- a/libstd/start-linux.s
+++ b/libstd/start-linux.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 */