Initial import

This commit is contained in:
Justine Tunney 2020-06-15 07:18:57 -07:00
commit c91b3c5006
14915 changed files with 590219 additions and 0 deletions

24
libc/sysv/README.md Normal file
View file

@ -0,0 +1,24 @@
SYNOPSIS
System Five Import Libraries
OVERVIEW
Bell System Five is the umbrella term we use to describe Linux,
FreeBSD, OpenBSD, and Mac OS X which all have nearly-identical
application binary interfaces that stood the test of time, having
definitions nearly the same as those of AT&T back in the 1980's.
Cosmopolitan aims to help you build apps that can endure over the
course of decades, just like these systems have: without needing to
lift a finger for maintenance churn, broken builds, broken hearts.
The challenge to System V binary compatibility basically boils down
to numbers. All these systems agree on what services are provided,
but tend to grant them wildly different numbers.
We address this by putting all the numbers in a couple big shell
scripts, ask the GNU Assembler to encode them into binaries using an
efficient LEB128 encoding, unpacked by _init(), and ref'd via extern
const. It gives us good debuggability, and any costs are gained back
by fewer branches in wrapper functions.z

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __accept$sysv 0x001e0063201e002b globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __accept4$sysv 0x005d021dffff0120 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __acl_aclcheck_fd 0xffff0162ffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __acl_aclcheck_file 0xffff0161ffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __acl_aclcheck_link 0xffff01acffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __acl_delete_fd 0xffff0160ffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __acl_delete_file 0xffff015fffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __acl_delete_link 0xffff01abffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __acl_get_fd 0xffff015dffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __acl_get_file 0xffff015bffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __acl_get_link 0xffff01a9ffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __acl_set_fd 0xffff015effffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __acl_set_file 0xffff015cffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __acl_set_link 0xffff01aaffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __cap_rights_get 0xffff0203ffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __connect$sysv 0x006200622062002a globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __disable_threadsignal 0xffffffff214bffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __dup3$sysv 0x0066ffffffff0124 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __fstat$sysv 0x0035022721530005 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __fstatat$sysv 0x002a022821d60106 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __ftruncate$sysv 0x00c901e020c9004d globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __get_tcb 0x014affffffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __getpeername$sysv 0x001f008d201f0034 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __getsockname$sysv 0x0020002020200033 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __gettimeofday$sysv 0x0043007420740060 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __lseek$sysv 0x00c701de20c70008 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __lstat$sysv 0x0028002821540006 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __mac_execve 0xffff019f217cffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __mac_get_fd 0xffff01822184ffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __mac_get_file 0xffff0183217effff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __mac_get_link 0xffff019a2180ffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __mac_get_mount 0xffffffff21a9ffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __mac_get_pid 0xffff01992186ffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __mac_get_proc 0xffff01802182ffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __mac_getfsstat 0xffffffff21aaffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __mac_mount 0xffffffff21a8ffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __mac_set_fd 0xffff01842185ffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __mac_set_file 0xffff0185217fffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __mac_set_link 0xffff019b2181ffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __mac_set_proc 0xffff01812183ffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __mac_syscall 0xffffffff217dffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __mmap$sysv 0x00c501dd20c50009 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __old_semwait_signal 0xffffffff2172ffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __old_semwait_signal_nocancel 0xffffffff2173ffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __pipe$sysv 0x0107021e202a0016 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __pipe2$sysv 0x0065021effff0125 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __pread$sysv 0x00ad01db20990011 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __preadv$sysv 0x010b0121ffff0127 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __pthread_canceled 0xffffffff214dffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __pthread_chdir 0xffffffff215cffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __pthread_fchdir 0xffffffff215dffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __pthread_kill 0xffffffff2148ffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __pthread_markcancel 0xffffffff214cffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __pthread_sigmask 0xffffffff2149ffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __pwrite$sysv 0x00ae01dc209a0012 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __pwritev$sysv 0x010c0122ffff0128 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __semwait_signal 0xffffffff214effff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __semwait_signal_nocancel 0xffffffff21a7ffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __set_tcb 0x0149ffffffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __setegid$bsd 0x00b600b620b6ffff globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __seteuid$bsd 0x00b700b720b7ffff globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __setugid 0xffff0176ffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __sigwait_nocancel 0xffffffff21a6ffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __socket$sysv 0x0061006120610029 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __stat$sysv 0x0026ffff21520004 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __syscall 0x00c6ffffffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __sysctl 0xffff00caffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __tfork 0x0008ffffffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __threxit 0x012effffffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __thrsigdivert 0x012fffffffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __thrsleep 0x005effffffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __thrwakeup 0x012dffffffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall __truncate$sysv 0x00c801df20c8004c globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall _sysctl 0xffffffffffff009c globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall _umtx_op 0xffff01c6ffffffff globl

2
libc/sysv/calls/abort2.s Normal file
View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall abort2 0xffff01cfffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall abort_with_payload 0xffffffff2209ffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall accept_nocancel 0xffffffff2194ffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall access$sysv 0x0021002120210015 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall access_extended 0xffffffff211cffff globl

2
libc/sysv/calls/acct.s Normal file
View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall acct 0x00330033203300a3 globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall add_key 0xffffffffffff00f8 globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall adjfreq 0x0131ffffffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall adjtime 0x008c008c208cffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall adjtimex 0xffffffffffff009f globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall afs3_syscall 0xffff0179ffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall aio_cancel 0xffff013c213cffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall aio_error 0xffff013d213dffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall aio_fsync 0xffff01d12139ffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall aio_mlock 0xffff021fffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall aio_read 0xffff013e213effff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall aio_return 0xffff013a213affff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall aio_suspend 0xffff013b213bffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall aio_suspend_nocancel 0xffffffff21a5ffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall aio_waitcomplete 0xffff0167ffffffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall aio_write 0xffff013f213fffff globl

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall alarm$sysv 0xffffffffffff0025 globl hidden

View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall arch_prctl$sysv 0x00a500a5ffff009e globl hidden

2
libc/sysv/calls/audit.s Normal file
View file

@ -0,0 +1,2 @@
.include "o/libc/sysv/macros.inc"
.scall audit 0xffff01bd215effff globl

Some files were not shown because too many files have changed in this diff Show more