cosmopolitan/libc/mem
Justine Tunney 8ff48201ca
Rewrite .zip.o file linker
This change takes an entirely new approach to the incremental linking of
pkzip executables. The assets created by zipobj.com are now treated like
debug data. After a .com.dbg is compiled, fixupobj.com should be run, so
it can apply fixups to the offsets and move the zip directory to the end
of the file. Since debug data doesn't get objcopy'd, a new tool has been
introduced called zipcopy.com which should be run after objcopy whenever
a .com file is created. This is all automated by the `cosmocc` toolchain
which is rapidly becoming the new recommended approach.

This change also introduces the new C23 checked arithmetic macros.
2023-06-10 09:29:44 -07:00
..
_gc_free.c Run clang-format on most sources 2023-04-27 05:44:32 -07:00
alg.h Add more sorting algorithms 2023-04-27 05:44:44 -07:00
aligned_alloc.c Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
alloca.h Initial import 2020-06-15 07:18:57 -07:00
arena.c Rewrite .zip.o file linker 2023-06-10 09:29:44 -07:00
arena.h Make fixes, improvements, and chibicc python bindings 2021-10-08 08:41:57 -07:00
arraylist.internal.h Fold LIBC_ALG into LIBC_MEM 2022-08-13 08:32:34 -07:00
arraylist2.internal.h Fold LIBC_ALG into LIBC_MEM 2022-08-13 08:32:34 -07:00
asprintf.c Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
balloc.c Introduce #include <cosmo.h> to toolchain users 2023-06-09 18:03:05 -07:00
bfree.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
bisect.internal.h Fold LIBC_ALG into LIBC_MEM 2022-08-13 08:32:34 -07:00
bisectcarleft.internal.h Fold LIBC_ALG into LIBC_MEM 2022-08-13 08:32:34 -07:00
bsearch.c Fold LIBC_ALG into LIBC_MEM 2022-08-13 08:32:34 -07:00
bsearch_r.c Fold LIBC_ALG into LIBC_MEM 2022-08-13 08:32:34 -07:00
bulk_free.c Get LIBC_MEM and LIBC_STDIO building with aarch64 2023-05-10 04:20:47 -07:00
calloc.c Get LIBC_MEM and LIBC_STDIO building with aarch64 2023-05-10 04:20:47 -07:00
copyfd.c Improve system call wrappers 2022-09-19 15:06:25 -07:00
copyfd.internal.h Improve system call wrappers 2022-09-19 15:06:25 -07:00
critbit0.h Fold LIBC_ALG into LIBC_MEM 2022-08-13 08:32:34 -07:00
critbit0_allprefixed.c Fold LIBC_ALG into LIBC_MEM 2022-08-13 08:32:34 -07:00
critbit0_clear.c Fold LIBC_ALG into LIBC_MEM 2022-08-13 08:32:34 -07:00
critbit0_contains.c Fold LIBC_ALG into LIBC_MEM 2022-08-13 08:32:34 -07:00
critbit0_delete.c Fold LIBC_ALG into LIBC_MEM 2022-08-13 08:32:34 -07:00
critbit0_emplace.c Fold LIBC_ALG into LIBC_MEM 2022-08-13 08:32:34 -07:00
critbit0_get.c Fold LIBC_ALG into LIBC_MEM 2022-08-13 08:32:34 -07:00
critbit0_insert.c Fold LIBC_ALG into LIBC_MEM 2022-08-13 08:32:34 -07:00
fmt.h Get GCC to mostly build with Cosmo 2023-06-09 06:41:34 -07:00
free.c Get LIBC_MEM and LIBC_STDIO building with aarch64 2023-05-10 04:20:47 -07:00
gc.c Get garbage collector working on aarch64 2023-06-07 03:34:45 -07:00
gc.h Pay off more technical debt 2022-09-12 23:36:56 -07:00
gc.internal.h Pay off more technical debt 2022-09-12 23:36:56 -07:00
get_current_dir_name.c Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
heapsort.c Import OpenBSD sorting algorithms 2022-09-06 17:52:26 -07:00
hook.internal.h Get LIBC_MEM and LIBC_STDIO building with aarch64 2023-05-10 04:20:47 -07:00
hook_realloc_in_place.c Get LIBC_MEM and LIBC_STDIO building with aarch64 2023-05-10 04:20:47 -07:00
internal.h Rename hidden keyword to _Hide 2022-11-08 12:55:28 -08:00
mallinfo.c Improve synchronization 2022-04-15 15:31:55 -07:00
malloc.c Get LIBC_MEM and LIBC_STDIO building with aarch64 2023-05-10 04:20:47 -07:00
malloc_inspect_all.c Improve synchronization 2022-04-15 15:31:55 -07:00
malloc_trim.c Get LIBC_MEM and LIBC_STDIO building with aarch64 2023-05-10 04:20:47 -07:00
malloc_usable_size.c Get LIBC_MEM and LIBC_STDIO building with aarch64 2023-05-10 04:20:47 -07:00
mem.h Implement pthread_atfork() 2022-10-16 12:25:13 -07:00
mem.mk Get llama.com building as an aarch64 native binary 2023-05-10 04:20:47 -07:00
memalign.c Get LIBC_MEM and LIBC_STDIO building with aarch64 2023-05-10 04:20:47 -07:00
mergesort.c Import OpenBSD sorting algorithms 2022-09-06 17:52:26 -07:00
posix_memalign.c Clean up some code 2022-12-11 14:30:59 -08:00
pvalloc.c Optimize memory layout 2022-09-12 04:26:52 -07:00
qsort.c Polyfill IPv6 on non-Linux 2022-09-08 06:06:22 -07:00
radix_sort_int32.c Add more sorting algorithms 2023-04-27 05:44:44 -07:00
radix_sort_int64.c Add more sorting algorithms 2023-04-27 05:44:44 -07:00
realloc.c Get LIBC_MEM and LIBC_STDIO building with aarch64 2023-05-10 04:20:47 -07:00
reallocarray.c Rewrite .zip.o file linker 2023-06-10 09:29:44 -07:00
replacestr.c Pay off more technical debt 2022-09-12 23:36:56 -07:00
reverse.internal.h Fold LIBC_ALG into LIBC_MEM 2022-08-13 08:32:34 -07:00
shuffle.internal.h Fold LIBC_ALG into LIBC_MEM 2022-08-13 08:32:34 -07:00
sortedints.c Make fixes and improvements 2022-10-19 07:19:19 -07:00
sortedints.internal.h Make fixes and improvements 2022-10-19 07:19:19 -07:00
strdup.c Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
strndup.c Use re-entrant locks on stdio 2022-05-22 08:28:33 -07:00
tarjan.c Fix bugs and make code tinier 2022-10-09 23:21:34 -07:00
unhexstr.c Fix bugs and make code tinier 2022-10-09 23:21:34 -07:00
valloc.c Optimize memory layout 2022-09-12 04:26:52 -07:00
vasprintf.c Fix bugs and make code tinier 2022-10-09 23:21:34 -07:00
wcsdup.c Fix wcsdup malloc size (#641) 2022-10-02 00:47:05 -07:00