ref: 23dc13cd28f352c55d1052b45683269290af8682
parent: 0ca62af5f0df449dd940cbd5b7e5723f739df8a0
author: Roberto E. Vargas Caballero <k0ga@shike2.com>
date: Fri Sep 21 09:14:53 EDT 2018
[lib/c] Add getenv() for posix systems
--- a/lib/crt/amd64-sysv-netbsd/crt.s
+++ b/lib/crt/amd64-sysv-netbsd/crt.s
@@ -16,8 +16,9 @@
.align 8
.global _start
_start:
- movq %rsp,%rbp
andq $-16,%rsp
+ movq %rsp,%rbp
+
movq 16(%rbp),%rbx
movq %rbx,_environ
call main