ref: 7e3c35928ca0acac963e16b7d0194a8896d0989c
parent: 6ebdc448545eb48b37b63fed98c03e219b620c96
author: Roberto E. Vargas Caballero <[email protected]>
date: Wed Dec 19 06:15:42 EST 2018
[libc] Fix system generation in some platforms
--- a/src/libc/arch/amd64/dragonfly/gensys.sh
+++ b/src/libc/arch/amd64/dragonfly/gensys.sh
@@ -19,8 +19,8 @@
jb 1f
retq
-1: movl %eax,(errno)
- movl \$-1,%eax
+1: movq %rax,(errno)
+ movq \$-1,%rax
retq
EOF
done
--- a/src/libc/arch/amd64/dragonfly/syscall.lst
+++ b/src/libc/arch/amd64/dragonfly/syscall.lst
@@ -4,7 +4,7 @@
4 _write
5 _open
6 _close
-17 _brk
+17 _brk
20 _getpid
37 _kill
199 _lseek
--- a/src/libc/arch/amd64/linux/syscall.lst
+++ b/src/libc/arch/amd64/linux/syscall.lst
@@ -4,7 +4,7 @@
2 _open
3 _close
8 _lseek
-12 _brk
+12 _brk
13 _sigaction
39 _getpid
60 _Exit
--- a/src/libc/arch/amd64/longjmp.s
+++ b/src/libc/arch/amd64/longjmp.s
@@ -1,7 +1,8 @@
.file "longjmp"
.text
- .globl longjmp
+ .globl longjmp,_longjmp
+_longjmp:
longjmp:
mov %rsi,%rax
test %rax,%rax
--- a/src/libc/arch/amd64/netbsd/gensys.sh
+++ b/src/libc/arch/amd64/netbsd/gensys.sh
@@ -19,8 +19,8 @@
jb 1f
retq
-1: movl %eax,(errno)
- movl \$-1,%eax
+1: movq %rax,(errno)
+ movq \$-1,%rax
retq
EOF
done
--- a/src/libc/arch/amd64/netbsd/syscall.lst
+++ b/src/libc/arch/amd64/netbsd/syscall.lst
@@ -4,7 +4,7 @@
4 _write
5 _open
6 _close
-17 _brk
+17 _brk
20 _getpid
37 _kill
199 _lseek
--- a/src/libc/arch/amd64/openbsd/gensys.sh
+++ b/src/libc/arch/amd64/openbsd/gensys.sh
@@ -19,8 +19,8 @@
jb 1f
retq
-1: movl %eax,(errno)
- movl \$-1,%eax
+1: movq %rax,(errno)
+ movq \$-1,%rax
retq
EOF
done
--- a/src/libc/arch/amd64/openbsd/syscall.lst
+++ b/src/libc/arch/amd64/openbsd/syscall.lst
@@ -4,7 +4,7 @@
4 _write
5 _open
6 _close
-17 _brk
+17 _brk
20 _getpid
46 _sigaction
122 _kill
--- a/src/libc/arch/amd64/setjmp.s
+++ b/src/libc/arch/amd64/setjmp.s
@@ -1,7 +1,8 @@
.file "setjmp.s"
.text
- .globl setjmp
+ .globl setjmp,_setjmp
+_setjmp:
setjmp:
mov %rbx,(%rdi)
mov %rbp,8(%rdi)