cosmopolitan/build
Justine Tunney dd53f31147
Introduce post-linker that converts ELF to PE
If you build a static ELF executable in `ld -q` mode (which leaves rela
sections inside the binary) then you can run it through the elf2pe.com
program afterwards, which will turn it into a PE executable. We have a
new trick for defining WIN32 DLL imports in C without any assembly code.
This also achieves the optimally tiny and perfect PE binary structure.

We need this because it isn't possible to have a GNU ld linker script
generate a PE file where the virtual pointer and the file pointer can
drift apart. This post-linker can do that. One cool benefit is we can
now use a smaller 512-byte alignment in the file, and an even bigger
64kb alignment for the segment virtual addresses, and the executable
ends up being smaller.

Another program introduced by this change is pecheck.com which can do
extensive linting of PE static executables to help explain why Windows
won't load it.
2023-08-09 18:46:06 -07:00
..
bootstrap Mint APE Loader 1.6 2023-08-09 00:27:26 -07:00
config.mk Make improvements 2023-07-10 04:35:14 -07:00
definitions.mk Introduce post-linker that converts ELF to PE 2023-08-09 18:46:06 -07:00
functions.mk Reduce GNU Make latency 17% for cosmo 2022-08-19 15:29:24 -07:00
gdb Fix redbean zip central directory lookup 2021-02-27 12:08:28 -08:00
htags Import exuberant ctags 2022-11-13 13:26:28 -08:00
objdump Make improvements 2023-06-03 08:12:22 -07:00
online.mk Improve aarch64 native support some more 2023-06-04 08:58:47 -07:00
realify.sed Add minor improvements and cleanup 2020-10-27 03:39:46 -07:00
realify.sh Make more improvements 2020-09-28 01:20:34 -07:00
rules.mk Remove ELF binaries from tests 2023-07-28 07:20:57 -07:00
run Make improvements 2023-06-03 08:12:22 -07:00
sanitycheck Fix some regressions with execution 2022-08-07 22:10:18 -07:00