ref: d5869067c222619979e82e95ca511cb1d217ce18
parent: fc03d6189b22d17ac7554ac3de5ab5d47f7d0030
author: Ori Bernstein <[email protected]>
date: Mon Oct 6 16:10:10 EDT 2014
Fix symbol names.
--- a/libstd/syscall+osx-x64.s
+++ b/libstd/syscall+osx-x64.s
@@ -1,5 +1,5 @@
-.globl _std$syscall
-_std$syscall:
+.globl _sys$syscall
+_sys$syscall:
pushq %rbp
pushq %rdi
pushq %rsi
@@ -48,8 +48,8 @@
*
* checking this involves peeking in %edx, so we need to do this in asm.
*/
-.globl _std$__osx_fork
-_std$__osx_fork:
+.globl _sys$__osx_fork
+_sys$__osx_fork:
pushq %rbp
pushq %rdi
pushq %rsi
@@ -88,8 +88,8 @@
* The pipe() syscall returns the pipes created in eax:edx, and
* needs to copy them to the destination locations manually.
*/
-.globl _std$__osx_pipe
-_std$__osx_pipe:
+.globl _sys$__osx_pipe
+_sys$__osx_pipe:
pushq %rbp
pushq %rdi
pushq %rsi
@@ -123,8 +123,8 @@
popq %rbp
ret
-.globl _std$__osx_gettimeofday
-_std$__osx_gettimeofday:
+.globl _sys$__osx_gettimeofday
+_sys$__osx_gettimeofday:
pushq %rbp
pushq %rdi
pushq %rsi
--- a/rt/start-osx.s
+++ b/rt/start-osx.s
@@ -1,14 +1,14 @@
.data
-/* std._environment : byte[:][:] */
-.globl _std$_environment
-_std$_environment:
+/* sys._environment : byte[:][:] */
+.globl _sys$__environment
+_sys$__environment:
.envbase:
.quad 0 /* env size */
.envlen:
.quad 0 /* env ptr */
-.globl _std$__cenvp
-_std$__cenvp:
+.globl _sys$__cenvp
+_sys$__cenvp:
.quad 0
.text
@@ -18,7 +18,7 @@
* - 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()
*/
@@ -35,10 +35,10 @@
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 */
- movq %rbx,_std$__cenvp(%rip)
+ movq %rbx,_sys$__cenvp(%rip)
movq %r9,%rax
movq %rsp, %rcx
movq %r9,.envlen(%rip)