Release Cosmopolitan v3.3

This change upgrades to GCC 12.3 and GNU binutils 2.42. The GNU linker
appears to have changed things so that only a single de-duplicated str
table is present in the binary, and it gets placed wherever the linker
wants, regardless of what the linker script says. To cope with that we
need to stop using .ident to embed licenses. As such, this change does
significant work to revamp how third party licenses are defined in the
codebase, using `.section .notice,"aR",@progbits`.

This new GCC 12.3 toolchain has support for GNU indirect functions. It
lets us support __target_clones__ for the first time. This is used for
optimizing the performance of libc string functions such as strlen and
friends so far on x86, by ensuring AVX systems favor a second codepath
that uses VEX encoding. It shaves some latency off certain operations.
It's a useful feature to have for scientific computing for the reasons
explained by the test/libcxx/openmp_test.cc example which compiles for
fifteen different microarchitectures. Thanks to the upgrades, it's now
also possible to use newer instruction sets, such as AVX512FP16, VNNI.

Cosmo now uses the %gs register on x86 by default for TLS. Doing it is
helpful for any program that links `cosmo_dlopen()`. Such programs had
to recompile their binaries at startup to change the TLS instructions.
That's not great, since it means every page in the executable needs to
be faulted. The work of rewriting TLS-related x86 opcodes, is moved to
fixupobj.com instead. This is great news for MacOS x86 users, since we
previously needed to morph the binary every time for that platform but
now that's no longer necessary. The only platforms where we need fixup
of TLS x86 opcodes at runtime are now Windows, OpenBSD, and NetBSD. On
Windows we morph TLS to point deeper into the TIB, based on a TlsAlloc
assignment, and on OpenBSD/NetBSD we morph %gs back into %fs since the
kernels do not allow us to specify a value for the %gs register.

OpenBSD users are now required to use APE Loader to run Cosmo binaries
and assimilation is no longer possible. OpenBSD kernel needs to change
to allow programs to specify a value for the %gs register, or it needs
to stop marking executable pages loaded by the kernel as mimmutable().

This release fixes __constructor__, .ctor, .init_array, and lastly the
.preinit_array so they behave the exact same way as glibc.

We no longer use hex constants to define math.h symbols like M_PI.
This commit is contained in:
Justine Tunney 2024-02-20 11:12:09 -08:00
parent d3ff48c63f
commit 957c61cbbf
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
736 changed files with 13726 additions and 9445 deletions

View file

@ -27,12 +27,7 @@
#include "third_party/mbedtls/common.h"
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview FIPS-197 compliant AES implementation

View file

@ -18,12 +18,7 @@
#include "third_party/mbedtls/aesce.h"
#include "libc/str/str.h"
#include "third_party/aarch64/arm_neon.internal.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* Armv8-A Cryptographic Extension support functions for Aarch64

View file

@ -19,12 +19,7 @@
#include "libc/serialize.h"
#include "libc/str/str.h"
#include "third_party/mbedtls/common.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* [AES-WP] http://software.intel.com/en-us/articles/intel-advanced-encryption-standard-aes-instructions-set

View file

@ -21,12 +21,7 @@
#include "third_party/mbedtls/common.h"
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
#if defined(MBEDTLS_ASN1_PARSE_C)

View file

@ -20,12 +20,7 @@
#include "third_party/mbedtls/common.h"
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview ASN.1 buffer writing functionality

View file

@ -19,12 +19,7 @@
#include "libc/str/str.h"
#include "third_party/mbedtls/common.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
#define ENC "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"

View file

@ -30,13 +30,11 @@
*/
void (*Mul4x4)(uint64_t C[16], const uint64_t A[8], const uint64_t B[8]);
static textstartup void Mul4x4Init()
__attribute__((__constructor__(10))) static textstartup void Mul4x4Init()
{
Mul4x4 = X86_HAVE(ADX) && X86_HAVE(BMI2) ? Mul4x4Adx : Mul4x4Pure;
}
const void *const Mul4x4Ctor[] initarray = {Mul4x4Init};
void Mul4x4Pure(uint64_t C[16], const uint64_t A[8], const uint64_t B[8])
{
uint128_t t;

View file

@ -33,12 +33,7 @@
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/profile.h"
#include "third_party/mbedtls/select.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview Big Numbers.

View file

@ -20,12 +20,7 @@
#include "third_party/mbedtls/common.h"
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview NIST SP800-38C compliant CCM implementation

View file

@ -17,12 +17,7 @@
*/
#include "third_party/mbedtls/certs.h"
#include "third_party/mbedtls/common.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
#if defined(MBEDTLS_CERTS_C)

View file

@ -22,12 +22,7 @@
#include "third_party/mbedtls/common.h"
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/* Parameter validation macros */
#define CHACHA20_VALIDATE_RET( cond ) \

View file

@ -21,12 +21,7 @@
#include "third_party/mbedtls/common.h"
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview ChaCha20-Poly1305 AEAD construction based on RFC 7539.

View file

@ -26,12 +26,7 @@
#include "third_party/mbedtls/gcm.h"
#include "third_party/mbedtls/nist_kw.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
#if defined(MBEDTLS_CIPHER_C)

View file

@ -27,12 +27,7 @@
#include "third_party/mbedtls/gcm.h"
#include "third_party/mbedtls/nist_kw.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
#if defined(MBEDTLS_CIPHER_C)

View file

@ -21,12 +21,7 @@
#include "third_party/mbedtls/ctr_drbg.h"
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview CTR_DRBG implementation based on AES-256 (NIST SP 800-90)

View file

@ -20,12 +20,7 @@
#include "third_party/mbedtls/debug.h"
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
char mbedtls_debug_threshold;

View file

@ -22,12 +22,7 @@
#include "third_party/mbedtls/common.h"
#include "third_party/mbedtls/endian.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview FIPS-46-3 compliant Triple-DES implementation

View file

@ -24,12 +24,7 @@
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/pem.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview Diffie-Hellman-Merkle key exchange

View file

@ -19,12 +19,7 @@
#include "third_party/mbedtls/ecdh.h"
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview Elliptic curve Diffie-Hellman

View file

@ -20,12 +20,7 @@
#include "third_party/mbedtls/everest.h"
#if defined(MBEDTLS_ECDH_C) && defined(MBEDTLS_ECDH_VARIANT_EVEREST_ENABLED)
#define KEYSIZE 32
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* \brief This function sets up the ECDH context with the information

View file

@ -23,12 +23,7 @@
#include "third_party/mbedtls/hmac_drbg.h"
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/profile.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview Elliptic curve Digital Signature Algorithm

View file

@ -32,12 +32,7 @@
#include "third_party/mbedtls/hmac_drbg.h"
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/profile.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview Elliptic curves over GF(p): generic functions

View file

@ -20,12 +20,7 @@
#include "third_party/mbedtls/ecp.h"
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* Elliptic curves over GF(p): curve-specific data and functions

View file

@ -23,12 +23,7 @@
#include "third_party/mbedtls/entropy_poll.h"
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* Entropy accumulator implementation

View file

@ -48,12 +48,7 @@
#include "third_party/mbedtls/sha512.h"
#include "third_party/mbedtls/ssl.h"
#include "third_party/mbedtls/x509.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* Error message information

View file

@ -18,10 +18,11 @@
#include "libc/serialize.h"
#include "third_party/mbedtls/endian.h"
asm(".ident\t\"\\n\\n\
Everest (Apache 2.0)\\n\
Copyright 2016-2018 INRIA and Microsoft Corporation\"");
asm(".include \"libc/disclaimer.inc\"");
__notice(cosmo_everest_notice, "\
Cosmopolitan Everest (Apache 2.0)\n\
Copyright 2024 Justine Alexndra Roberts Tunney\n\
Copyright 2016-2018 INRIA and Microsoft Corporation\n\
Changes: Made C code look nice and not have pointers");
#define DW(x) (uint128_t)(x)
#define EQ(x, y) ((((x ^ y) | (~(x ^ y) + 1)) >> 63) - 1)

View file

@ -29,12 +29,7 @@
#include "third_party/mbedtls/endian.h"
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* NIST SP800-38D compliant GCM implementation

View file

@ -20,12 +20,7 @@
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/hkdf.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview HKDF implementation (RFC 5869)

View file

@ -21,12 +21,7 @@
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/hmac_drbg.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* HMAC_DRBG implementation (NIST SP 800-90)

View file

@ -27,12 +27,7 @@
#include "third_party/mbedtls/sha1.h"
#include "third_party/mbedtls/sha256.h"
#include "third_party/mbedtls/sha512.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* \file md.c

View file

@ -22,12 +22,7 @@
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/md.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* RFC 1321 compliant MD5 implementation

View file

@ -18,12 +18,7 @@
#include "libc/str/str.h"
#include "third_party/mbedtls/md5.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* RFC 1321 test vectors

View file

@ -18,12 +18,7 @@
#include "third_party/mbedtls/common.h"
#include "third_party/mbedtls/memory_buffer_alloc.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* Buffer-based memory allocator

View file

@ -21,12 +21,7 @@
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/nist_kw.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* Implementation of NIST SP 800-38F key wrapping, supporting KW and KWP modes

4
third_party/mbedtls/notice.c vendored Normal file
View file

@ -0,0 +1,4 @@
__notice(mbedtls_notice, "\
Mbed TLS (Apache 2.0)\n\
Copyright ARM Limited\n\
Copyright The Mbed TLS Contributors");

View file

@ -21,12 +21,7 @@
#include "third_party/mbedtls/oid.h"
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/rsa.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview Object Identifier (OID) database

View file

@ -27,12 +27,7 @@
#include "third_party/mbedtls/md5.h"
#include "third_party/mbedtls/pem.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview Privacy Enhanced Mail (PEM) decoding

View file

@ -23,12 +23,7 @@
#include "third_party/mbedtls/pk_internal.h"
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/rsa.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview Public Key abstraction layer

View file

@ -25,12 +25,7 @@
#include "third_party/mbedtls/pk_internal.h"
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/rsa.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview Public Key abstraction layer: wrapper functions

View file

@ -22,12 +22,7 @@
#include "third_party/mbedtls/oid.h"
#include "third_party/mbedtls/pkcs5.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview PKCS#5 functions, e.g. PBKDF2

View file

@ -27,12 +27,7 @@
#include "third_party/mbedtls/pkcs5.h"
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/rsa.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* Public Key layer for parsing key files and structures

View file

@ -26,12 +26,7 @@
#include "third_party/mbedtls/pk.h"
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/rsa.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* Public Key layer for writing key files and structures

View file

@ -21,12 +21,7 @@
#include "third_party/mbedtls/common.h"
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* \file poly1305.c

View file

@ -27,12 +27,7 @@
#include "third_party/mbedtls/profile.h"
#include "third_party/mbedtls/rsa_internal.h"
#include "third_party/mbedtls/sha1.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview The RSA public-key cryptosystem

View file

@ -20,12 +20,7 @@
#include "third_party/mbedtls/profile.h"
#include "third_party/mbedtls/rsa.h"
#include "third_party/mbedtls/rsa_internal.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* Helper functions for the RSA module

View file

@ -27,12 +27,7 @@
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/md.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview FIPS-180-1 compliant SHA-1 implementation

View file

@ -18,12 +18,7 @@
#include "libc/str/str.h"
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/sha1.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* FIPS-180-1 test vectors

View file

@ -27,12 +27,7 @@
#include "third_party/mbedtls/endian.h"
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/md.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview FIPS-180-2 compliant SHA-256 implementation

View file

@ -18,12 +18,7 @@
#include "libc/str/str.h"
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/sha256.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* FIPS-180-2 test vectors

View file

@ -28,12 +28,7 @@
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/md.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview FIPS-180-2 compliant SHA-384/512 implementation

View file

@ -19,12 +19,7 @@
#include "libc/str/str.h"
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/sha512.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* FIPS-180-2 test vectors

View file

@ -21,8 +21,7 @@
void (*ShiftRight)(uint64_t *, size_t, unsigned char);
__attribute__((__constructor__(10)))
static textstartup void ShiftRightInit(void) {
ShiftRight = 0 && X86_HAVE(AVX) ? ShiftRightAvx : ShiftRightPure;
}
const void *const ShiftRightCtor[] initarray = {ShiftRightInit};

View file

@ -21,12 +21,7 @@
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/ssl_cache.h"
#include "third_party/mbedtls/ssl_internal.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* SSL session cache implementation

View file

@ -25,12 +25,7 @@
#include "third_party/mbedtls/common.h"
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/ssl.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* CRYPTOGRAPHY 101

View file

@ -22,12 +22,7 @@
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/ssl.h"
#include "third_party/mbedtls/ssl_internal.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* SSLv3/TLSv1 client-side functions

View file

@ -20,12 +20,7 @@
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/ssl_cookie.h"
#include "third_party/mbedtls/ssl_internal.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* DTLS cookie callbacks implementation

View file

@ -27,12 +27,7 @@
#include "third_party/mbedtls/ssl.h"
#include "third_party/mbedtls/ssl_internal.h"
#include "third_party/mbedtls/ssl_invasive.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* Generic SSL/TLS messaging layer functions

View file

@ -27,12 +27,7 @@
#include "third_party/mbedtls/profile.h"
#include "third_party/mbedtls/ssl.h"
#include "third_party/mbedtls/ssl_internal.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* SSLv3/TLSv1 server-side functions

View file

@ -21,12 +21,7 @@
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/ssl_internal.h"
#include "third_party/mbedtls/ssl_ticket.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* TLS server tickets callbacks implementation

View file

@ -28,12 +28,7 @@
#include "third_party/mbedtls/ssl_ciphersuites.h"
#include "third_party/mbedtls/ssl_internal.h"
#include "third_party/mbedtls/version.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview SSLv3/TLSv1 shared functions

View file

@ -19,12 +19,7 @@
#include "third_party/mbedtls/hkdf.h"
#include "third_party/mbedtls/ssl_internal.h"
#include "third_party/mbedtls/ssl_tls13_keys.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* TLS 1.3 key schedule

View file

@ -7,10 +7,8 @@
#include "libc/serialize.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Everest (Apache 2.0)\\n\
Copyright 2016-2018 INRIA and Microsoft Corporation\"");
asm(".include \"libc/disclaimer.inc\"");
__notice(everest_notice, "Everest (Apache 2.0)\n\
Copyright 2016-2018 INRIA and Microsoft Corporation");
/*
* ECDH with curve-optimized implementation multiplexing

View file

@ -50,12 +50,7 @@
#include "third_party/mbedtls/error.h"
#include "libc/serialize.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
__static_yoink("zipos");

View file

@ -6,11 +6,6 @@
#include "libc/sysv/consts/exit.h"
#include "third_party/mbedtls/config.h"
#include "third_party/mbedtls/test/lib.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
__static_yoink("zipos");

View file

@ -28,12 +28,7 @@
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/x509.h"
#include "third_party/mbedtls/x509_crt.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* X.509 common functions for parsing and verification

View file

@ -20,12 +20,7 @@
#include "third_party/mbedtls/error.h"
#include "third_party/mbedtls/oid.h"
#include "third_party/mbedtls/x509.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* X.509 base functions for creating certificates / CSRs

View file

@ -21,12 +21,7 @@
#include "third_party/mbedtls/pem.h"
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/x509_crl.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview X.509 Certidicate Revocation List (CRL) parsing

View file

@ -32,12 +32,7 @@
#include "third_party/mbedtls/oid.h"
#include "third_party/mbedtls/pem.h"
#include "third_party/mbedtls/platform.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* X.509 certificate parsing and verification

View file

@ -21,12 +21,7 @@
#include "third_party/mbedtls/pem.h"
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/x509_csr.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/**
* @fileoverview X.509 Certificate Signing Request (CSR) parsing

View file

@ -23,12 +23,7 @@
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/sha1.h"
#include "third_party/mbedtls/x509_crt.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* X.509 certificate writing

View file

@ -22,12 +22,7 @@
#include "third_party/mbedtls/pem.h"
#include "third_party/mbedtls/platform.h"
#include "third_party/mbedtls/x509_csr.h"
asm(".ident\t\"\\n\\n\
Mbed TLS (Apache 2.0)\\n\
Copyright ARM Limited\\n\
Copyright Mbed TLS Contributors\"");
asm(".include \"libc/disclaimer.inc\"");
__static_yoink("mbedtls_notice");
/*
* X.509 Certificate Signing Request writing