summaryrefslogtreecommitdiff
path: root/rt
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2014-10-06 17:43:30 -0400
committerOri Bernstein <ori@eigenstate.org>2014-10-06 17:43:30 -0400
commit5131214c8ddbd9a4f3a4b6c9acef575985ff867d (patch)
tree12c12b4c534729003ff3236d94ebb92cd96b1f04 /rt
parentfe0e401477b76a165557e25a4def39f47f5178e2 (diff)
downloadmc-5131214c8ddbd9a4f3a4b6c9acef575985ff867d.tar.gz
Split libstd into libstd and libsys.
Diffstat (limited to 'rt')
-rw-r--r--rt/start-linux.s27
1 files changed, 14 insertions, 13 deletions
diff --git a/rt/start-linux.s b/rt/start-linux.s
index 717d00f..0313fba 100644
--- a/rt/start-linux.s
+++ b/rt/start-linux.s
@@ -1,15 +1,16 @@
.data
-/* std._environment : byte[:][:] */
-.globl std$_environment
-std$_environment:
-.envbase:
-.quad 0 /* env size */
-.envlen:
-.quad 0 /* env ptr */
-.globl std$__cenvp
-std$__cenvp:
-.quad 0
+/* sys._environment : byte[:][:] */
+.globl sys$__environment
+sys$__environment:
+ .envbase:
+ .quad 0 /* env size */
+ .envlen:
+ .quad 0 /* env ptr */
+
+.globl sys$__cenvp
+sys$__cenvp:
+ .quad 0
.text
/*
@@ -18,7 +19,7 @@ std$__cenvp:
* - 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 envp in sys._environment
* - Stashes a raw envp copy in __cenvp (for syscalls to use)
* - Calls main()
*/
@@ -45,11 +46,11 @@ _start:
subq %rax,%rsp
movq %rsp, %rdx /* saved args[:] */
- /* convert envp to byte[:][:] for std._environment */
+ /* convert envp to byte[:][:] for sys._environment */
movq (%rbp),%rax
leaq 16(%rbp,%rax,8), %rbx /* envp = argv + 8*argc + 8 */
/* store envp for some syscalls to use without converting */
- movq %rbx,std$__cenvp(%rip)
+ movq %rbx,sys$__cenvp(%rip)
movq %r9,%rax
movq %rsp, %rcx
movq %r9,.envlen