mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-06 19:28:29 +00:00
Release pledge.com v1.1
This change fixes bugs, adds more system calls, and improves compatibility with OpenBSD. Going forward, versions on the web will be pinned to a permanent version. There were many other changes over the last week which also improved this new release.
This commit is contained in:
parent
b5904947e9
commit
76d2f68c91
34 changed files with 164 additions and 89 deletions
|
@ -1,2 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall clock_nanosleep,0xffffff0f4ffff0e6,globl
|
||||
.scall clock_nanosleep,0x1ddfff0f4ffff0e6,globl
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall get_robust_list,0xfffffffffffff112,globl
|
||||
.scall get_robust_list,0x0a8ffffffffff112,globl
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall posix_fallocate,0xffffff212fffffff,globl,hidden
|
||||
.scall posix_fallocate,0x1dffff212fffffff,globl,hidden
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall set_robust_list,0xfffffffffffff111,globl
|
||||
.scall set_robust_list,0x0a7ffffffffff111,globl
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall sys_creat,0xffffff008ffff055,globl,hidden
|
||||
.scall sys_creat,0x008fff008ffff055,globl,hidden
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall sys_futex,0xfff053fffffff0ca,globl,hidden
|
||||
.scall sys_futex,0x0a6053fffffff0ca,globl,hidden
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall sys_killpg,0xffffff092fffffff,globl,hidden
|
||||
.scall sys_killpg,0x092fff092fffffff,globl,hidden
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall sys_posix_spawn,0xfffffffff20f4fff,globl,hidden
|
||||
.scall sys_posix_spawn,0x1daffffff20f4fff,globl,hidden
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall sys_sync,0xfff02402420240a2,globl,hidden
|
||||
.scall sys_sync,0x02402402420240a2,globl,hidden
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
.include "o/libc/sysv/macros.internal.inc"
|
||||
.scall sys_uname,0xffffff0a4ffff03f,globl,hidden
|
||||
.scall sys_uname,0x0a4fff0a4ffff03f,globl,hidden
|
||||
|
|
|
@ -1313,9 +1313,9 @@ syscon rusage RUSAGE_BOTH -2 99 99 99 99 99 # woop
|
|||
#
|
||||
# group name GNU/Systemd XNU's Not UNIX! FreeBSD OpenBSD NetBSD The New Technology Commentary
|
||||
syscon futex FUTEX_WAIT 0 0 0 1 0 0
|
||||
syscon futex FUTEX_WAKE 1 0 0 2 0 0
|
||||
syscon futex FUTEX_REQUEUE 3 0 0 3 0 0
|
||||
syscon futex FUTEX_PRIVATE_FLAG 128 0 0 128 0 0
|
||||
syscon futex FUTEX_WAKE 1 0 0 2 1 0
|
||||
syscon futex FUTEX_REQUEUE 3 0 0 3 3 0
|
||||
syscon futex FUTEX_PRIVATE_FLAG 128 0 0 128 128 0
|
||||
|
||||
# lio_listio() magnums
|
||||
#
|
||||
|
@ -1871,9 +1871,9 @@ syscon nr __NR_kill 0x003e 0x2000025 0x0025 0x007a 0x025 0xfff
|
|||
syscon nr __NR_killpg 0xfff 0xfff 0x0092 0xfff 0xfff 0xfff
|
||||
syscon nr __NR_clone 0x0038 0xfff 0xfff 0xfff 0x11f 0xfff
|
||||
syscon nr __NR_tkill 0x00c8 0xfff 0xfff 0xfff 0xfff 0xfff
|
||||
syscon nr __NR_futex 0x00ca 0xfff 0xfff 0x0053 0xfff 0xfff
|
||||
syscon nr __NR_set_robust_list 0x0111 0xfff 0xfff 0xfff 0xfff 0xfff
|
||||
syscon nr __NR_get_robust_list 0x0112 0xfff 0xfff 0xfff 0xfff 0xfff
|
||||
syscon nr __NR_futex 0x00ca 0xfff 0xfff 0x0053 0x0a6 0xfff
|
||||
syscon nr __NR_set_robust_list 0x0111 0xfff 0xfff 0xfff 0x0a7 0xfff
|
||||
syscon nr __NR_get_robust_list 0x0112 0xfff 0xfff 0xfff 0x0a8 0xfff
|
||||
syscon nr __NR_uname 0x003f 0xfff 0x00a4 0xfff 0xfff 0xfff
|
||||
syscon nr __NR_semget 0x0040 0x20000ff 0x00dd 0x00dd 0x0dd 0xfff
|
||||
syscon nr __NR_semop 0x0041 0x2000100 0x00de 0x0122 0x0de 0xfff
|
||||
|
@ -1895,7 +1895,7 @@ syscon nr __NR_fchdir 0x0051 0x200000d 0x000d 0x000d 0x00d 0xfff
|
|||
syscon nr __NR_rename 0x0052 0x2000080 0x0080 0x0080 0x080 0xfff
|
||||
syscon nr __NR_mkdir 0x0053 0x2000088 0x0088 0x0088 0x088 0xfff
|
||||
syscon nr __NR_rmdir 0x0054 0x2000089 0x0089 0x0089 0x089 0xfff
|
||||
syscon nr __NR_creat 0x0055 0xfff 0x0008 0xfff 0xfff 0xfff
|
||||
syscon nr __NR_creat 0x0055 0xfff 0x0008 0xfff 0x008 0xfff
|
||||
syscon nr __NR_link 0x0056 0x2000009 0x0009 0x0009 0x009 0xfff
|
||||
syscon nr __NR_unlink 0x0057 0x200000a 0x000a 0x000a 0x00a 0xfff
|
||||
syscon nr __NR_symlink 0x0058 0x2000039 0x0039 0x0039 0x039 0xfff
|
||||
|
@ -1950,7 +1950,7 @@ syscon nr __NR_mlockall 0x0097 0x2000144 0x0144 0x010f 0x0f2 0xfff
|
|||
syscon nr __NR_munlockall 0x0098 0x2000145 0x0145 0x0110 0x0f3 0xfff
|
||||
syscon nr __NR_setrlimit 0x00a0 0x20000c3 0x00c3 0x00c3 0x0c3 0xfff
|
||||
syscon nr __NR_chroot 0x00a1 0x200003d 0x003d 0x003d 0x03d 0xfff
|
||||
syscon nr __NR_sync 0x00a2 0x2000024 0x0024 0x0024 0xfff 0xfff
|
||||
syscon nr __NR_sync 0x00a2 0x2000024 0x0024 0x0024 0x024 0xfff
|
||||
syscon nr __NR_acct 0x00a3 0x2000033 0x0033 0x0033 0x033 0xfff
|
||||
syscon nr __NR_settimeofday 0x00a4 0x200007a 0x007a 0x0044 0x1a3 0xfff
|
||||
syscon nr __NR_mount 0x00a5 0x20000a7 0x0015 0x0015 0x19a 0xfff
|
||||
|
@ -2028,7 +2028,7 @@ syscon nr __NR_timer_delete 0x00e2 0xfff 0xfff 0xfff 0x0ec 0xfff
|
|||
syscon nr __NR_clock_settime 0x00e3 0xfff 0x00e9 0x0058 0x1ac 0xfff
|
||||
syscon nr __NR_clock_gettime 0x00e4 0xfff 0x00e8 0x0057 0x1ab 0xfff
|
||||
syscon nr __NR_clock_getres 0x00e5 0xfff 0x00ea 0x0059 0x1ad 0xfff
|
||||
syscon nr __NR_clock_nanosleep 0x00e6 0xfff 0x00f4 0xfff 0xfff 0xfff
|
||||
syscon nr __NR_clock_nanosleep 0x00e6 0xfff 0x00f4 0xfff 0x1dd 0xfff
|
||||
syscon nr __NR_tgkill 0x00ea 0xfff 0xfff 0xfff 0xfff 0xfff
|
||||
syscon nr __NR_mbind 0x00ed 0xfff 0xfff 0xfff 0xfff 0xfff
|
||||
syscon nr __NR_set_mempolicy 0x00ee 0xfff 0xfff 0xfff 0xfff 0xfff
|
||||
|
@ -2076,7 +2076,7 @@ syscon nr __NR_preadv 0x0127 0xfff 0x0121 0x010b 0x121 0xfff
|
|||
syscon nr __NR_pwritev 0x0128 0xfff 0x0122 0x010c 0x122 0xfff
|
||||
syscon nr __NR_utimensat 0x0118 0xfff 0x0223 0x0054 0x1d3 0xfff
|
||||
syscon nr __NR_fallocate 0x011d 0xfff 0xfff 0xfff 0xfff 0xfff
|
||||
syscon nr __NR_posix_fallocate 0xfff 0xfff 0x0212 0xfff 0xfff 0xfff
|
||||
syscon nr __NR_posix_fallocate 0xfff 0xfff 0x0212 0xfff 0x1df 0xfff
|
||||
syscon nr __NR_accept4 0x0120 0xfff 0x021d 0x005d 0xfff 0xfff
|
||||
syscon nr __NR_dup3 0x0124 0xfff 0xfff 0x0066 0x1c6 0xfff
|
||||
syscon nr __NR_pipe2 0x0125 0xfff 0x021e 0x0065 0x1c5 0xfff
|
||||
|
|
2
libc/sysv/consts/CLOSE_RANGE_CLOEXEC.S
Normal file
2
libc/sysv/consts/CLOSE_RANGE_CLOEXEC.S
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon close,CLOSE_RANGE_CLOEXEC,4,-1,-1,-1,-1,-1
|
2
libc/sysv/consts/CLOSE_RANGE_UNSHARE.S
Normal file
2
libc/sysv/consts/CLOSE_RANGE_UNSHARE.S
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon close,CLOSE_RANGE_UNSHARE,2,-1,-1,-1,-1,-1
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon junkerr,EBADFD,77,9,0,0,0,0
|
||||
.syscon errno,EBADFD,77,9,0,0,0,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon futex,FUTEX_PRIVATE_FLAG,128,0,0,128,0,0
|
||||
.syscon futex,FUTEX_PRIVATE_FLAG,128,0,0,128,128,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon futex,FUTEX_REQUEUE,3,0,0,3,0,0
|
||||
.syscon futex,FUTEX_REQUEUE,3,0,0,3,3,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon futex,FUTEX_WAKE,1,0,0,2,0,0
|
||||
.syscon futex,FUTEX_WAKE,1,0,0,2,1,0
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon nr,__NR_clock_nanosleep,0x00e6,0xfff,0x00f4,0xfff,0xfff,0xfff
|
||||
.syscon nr,__NR_clock_nanosleep,0x00e6,0xfff,0x00f4,0xfff,0x1dd,0xfff
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon nr,__NR_creat,0x0055,0xfff,0x0008,0xfff,0xfff,0xfff
|
||||
.syscon nr,__NR_creat,0x0055,0xfff,0x0008,0xfff,0x008,0xfff
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon nr,__NR_futex,0x00ca,0xfff,0xfff,0x0053,0xfff,0xfff
|
||||
.syscon nr,__NR_futex,0x00ca,0xfff,0xfff,0x0053,0x0a6,0xfff
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon nr,__NR_get_robust_list,0x0112,0xfff,0xfff,0xfff,0xfff,0xfff
|
||||
.syscon nr,__NR_get_robust_list,0x0112,0xfff,0xfff,0xfff,0x0a8,0xfff
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon nr,__NR_posix_fallocate,0xfff,0xfff,0x0212,0xfff,0xfff,0xfff
|
||||
.syscon nr,__NR_posix_fallocate,0xfff,0xfff,0x0212,0xfff,0x1df,0xfff
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon nr,__NR_set_robust_list,0x0111,0xfff,0xfff,0xfff,0xfff,0xfff
|
||||
.syscon nr,__NR_set_robust_list,0x0111,0xfff,0xfff,0xfff,0x0a7,0xfff
|
||||
|
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon nr,__NR_sync,0x00a2,0x2000024,0x0024,0x0024,0xfff,0xfff
|
||||
.syscon nr,__NR_sync,0x00a2,0x2000024,0x0024,0x0024,0x024,0xfff
|
||||
|
|
|
@ -92,17 +92,17 @@ scall sys_setsockopt 0x0690690692069036 globl hidden
|
|||
scall sys_getsockopt 0x0760760762076037 globl hidden
|
||||
scall sys_fork 0x0020020022002039 globl hidden # xnu needs eax&=~-edx bc eax always holds pid and edx is 0 for parent and 1 for child
|
||||
#scall vfork 0x042042042204203a globl # this syscall is from the moon so we implement it by hand in libc/runtime/vfork.S; probably removed from XNU in 12.5
|
||||
scall sys_posix_spawn 0xfffffffff20f4fff globl hidden # good luck figuring out how xnu defines this
|
||||
scall sys_posix_spawn 0x1daffffff20f4fff globl hidden # good luck figuring out how xnu defines this
|
||||
scall __sys_execve 0x03b03b03b203b03b globl hidden
|
||||
scall __sys_wait4 0x1c100b007200703d globl hidden
|
||||
scall sys_kill 0x02507a025202503e globl hidden # kill(pid, sig, 1) b/c xnu
|
||||
scall sys_killpg 0xffffff092fffffff globl hidden
|
||||
scall sys_killpg 0x092fff092fffffff globl hidden
|
||||
scall sys_clone 0x11fffffffffff038 globl hidden
|
||||
scall sys_tkill 0x13e0771b121690c8 globl hidden # thr_kill() on freebsd; _lwp_kill() on netbsd; thrkill() on openbsd where arg3 should be 0; bsdthread_terminate() on XNU which only has 1 arg
|
||||
scall sys_futex 0xfff053fffffff0ca globl hidden
|
||||
scall set_robust_list 0xfffffffffffff111 globl
|
||||
scall get_robust_list 0xfffffffffffff112 globl
|
||||
scall sys_uname 0xffffff0a4ffff03f globl hidden
|
||||
scall sys_futex 0x0a6053fffffff0ca globl hidden # raises SIGSYS on NetBSD
|
||||
scall set_robust_list 0x0a7ffffffffff111 globl
|
||||
scall get_robust_list 0x0a8ffffffffff112 globl
|
||||
scall sys_uname 0x0a4fff0a4ffff03f globl hidden
|
||||
scall semget 0x0dd0dd0dd20ff040 globl # won't polyfill for windows
|
||||
scall semop 0x0de1220de2100041 globl # won't polyfill for windows
|
||||
scall semctl 0xfff1271fe20fe042 globl # won't polyfill for windows
|
||||
|
@ -123,7 +123,7 @@ scall sys_fchdir 0x00d00d00d200d051 globl hidden
|
|||
scall sys_rename 0x0800800802080052 globl hidden
|
||||
scall sys_mkdir 0x0880880882088053 globl hidden
|
||||
scall sys_rmdir 0x0890890892089054 globl hidden
|
||||
scall sys_creat 0xffffff008ffff055 globl hidden
|
||||
scall sys_creat 0x008fff008ffff055 globl hidden
|
||||
scall sys_link 0x0090090092009056 globl hidden
|
||||
scall sys_unlink 0x00a00a00a200a057 globl hidden
|
||||
scall sys_symlink 0x0390390392039058 globl hidden
|
||||
|
@ -178,7 +178,7 @@ scall mlockall 0x0f210f1442144097 globl
|
|||
scall munlockall 0x0f31101452145098 globl
|
||||
scall sys_setrlimit 0x0c30c30c320c30a0 globl hidden
|
||||
scall sys_chroot 0x03d03d03d203d0a1 globl hidden
|
||||
scall sys_sync 0xfff02402420240a2 globl hidden
|
||||
scall sys_sync 0x02402402420240a2 globl hidden
|
||||
scall acct 0x03303303320330a3 globl
|
||||
scall settimeofday 0x1a304407a207a0a4 globl
|
||||
scall sys_mount 0x19a01501520a70a5 globl hidden
|
||||
|
@ -263,9 +263,9 @@ scall ktimer_settime 0xffffff0edfffffff globl
|
|||
scall clock_settime 0x1ac0580e9ffff0e3 globl
|
||||
scall sys_clock_gettime 0x1ab0570e8ffff0e4 globl hidden # Linux 2.6+ (c. 2003); XNU uses magic address
|
||||
scall sys_clock_getres 0x1ad0590eaffff0e5 globl hidden
|
||||
scall clock_nanosleep 0xffffff0f4ffff0e6 globl
|
||||
scall clock_nanosleep 0x1ddfff0f4ffff0e6 globl
|
||||
scall sys_tgkill 0xfffffffffffff0ea globl hidden
|
||||
scall mbind 0xfffffffffffff0ed globl
|
||||
scall mbind 0xfffffffffffff0ed globl # numa numa yeah
|
||||
scall set_mempolicy 0xfffffffffffff0ee globl
|
||||
scall get_mempolicy 0xfffffffffffff0ef globl
|
||||
scall mq_open 0x101ffffffffff0f0 globl # won't polyfill
|
||||
|
@ -312,7 +312,7 @@ scall sys_preadv 0x12110b121221c127 globl hidden # ├─ last distro with sys
|
|||
scall sys_pwritev 0x12210c122221d128 globl hidden # ├─ rob landley unleashes busybox gpl lawsuits
|
||||
scall __sys_utimensat 0x1d3054223ffff118 globl hidden # ├─ python modules need this due to pep513
|
||||
scall fallocate 0xfffffffffffff11d globl hidden # ├─ end of life 2020-11-30 (extended)
|
||||
scall posix_fallocate 0xffffff212fffffff globl hidden # └─ cosmopolitan supports rhel5+
|
||||
scall posix_fallocate 0x1dffff212fffffff globl hidden # └─ cosmopolitan supports rhel5+
|
||||
scall __sys_accept4 0xfff05d21dffff120 globl hidden # Linux 2.6.28+
|
||||
scall __sys_dup3 0x1c6066fffffff124 globl hidden # Linux 2.6.27+
|
||||
scall __sys_pipe2 0x1c506521effff125 globl hidden # Linux 2.6.27+
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue