Get Cosmopolitan into releasable state

A new rollup tool now exists for flattening out the headers in a way
that works better for our purposes than cpp. A lot of the API clutter
has been removed. APIs that aren't a sure thing in terms of general
recommendation are now marked internal.

There's now a smoke test for the amalgamation archive and gigantic
header file. So we can now guarantee you can use this project on the
easiest difficulty setting without the gigantic repository.

A website is being created, which is currently a work in progress:
https://justine.storage.googleapis.com/cosmopolitan/index.html
This commit is contained in:
Justine Tunney 2020-11-25 08:19:00 -08:00
parent dba7552c1e
commit ea0b5d9d1c
775 changed files with 6864 additions and 3963 deletions

View file

@ -46,8 +46,8 @@ syscount:
.previous
.init.start 701,_init_g_syscount
mov systemfive(%rip),%rax
mov __systemfive(%rip),%rax
stosq
ezlea syscount,ax
mov %rax,systemfive(%rip)
mov %rax,__systemfive(%rip)
.init.end 701,_init_g_syscount

View file

@ -1,22 +1,3 @@
/*-*- mode:unix-assembly; indent-tabs-mode:t; tab-width:8; coding:utf-8 -*-│
vi: set et ft=asm ts=8 tw=8 fenc=utf-8 :vi
Copyright 2020 Justine Alexandra Roberts Tunney
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
02110-1301 USA
*/
#ifndef COSMOPOLITAN_LIBC_SYSV_MACROS_H_
#define COSMOPOLITAN_LIBC_SYSV_MACROS_H_
#ifdef __ASSEMBLER__
@ -38,13 +19,13 @@
.ifnb \kw2
.align 16
\name: movabs $\num,%rax
jmp *systemfive(%rip)
jmp *__systemfive(%rip)
.else
\name: push %rbp
mov %rsp,%rbp
movabs $\num,%rax
.hookable
call *systemfive(%rip)
call *__systemfive(%rip)
pop %rbp
ret
.endif

View file

@ -40,5 +40,5 @@ syscall:mov %rdi,%rax
mov %r8,%rcx # intended
mov %r9,%r8
mov 8(%rsp),%r9
jmp *systemfive(%rip)
jmp *__systemfive(%rip)
.endfn syscall,globl

View file

@ -84,11 +84,12 @@
/ @clob %rcx,%r10,%r11
/ @see syscalls.sh
.initbss 300,_init_systemfive
hostos: .quad 0
.endobj hostos,globl,hidden
systemfive:
__hostos:
.quad 0
.endobj systemfive,globl,hidden
.endobj __hostos,globl,hidden
__systemfive:
.quad 0
.endobj __systemfive,globl,hidden
.previous
.Lanchorpoint:
systemfive.linux:
@ -211,10 +212,10 @@ systemfive.init.xnu:
systemfive.init.os:
ezlea .Lanchorpoint,cx
pop %rax
stosq # hostos
stosq # __hostos
pop %rax
add %rcx,%rax
stosq # systemfive
stosq # __systemfive
push %rdi
ezlea syscon.start,di
ezlea syscon.end,bx