cosmopolitan/tool/emacs
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
..
c.lang Introduce post-linker that converts ELF to PE 2023-08-09 18:46:06 -07:00
cosmo-asm-mode.el Create ELF aliases for identical symbols 2023-06-06 03:33:49 -07:00
cosmo-c-builtins.el Mint APE Loader v1.5 2023-07-26 13:54:49 -07:00
cosmo-c-constants.el Fiddle around with Mach-O 2023-05-20 04:13:49 -07:00
cosmo-c-keywords.el Introduce post-linker that converts ELF to PE 2023-08-09 18:46:06 -07:00
cosmo-c-types.el Make some system call fixes 2023-02-12 22:16:34 -08:00
cosmo-cpp-constants.el Make more fixes and improvements 2023-07-29 18:44:15 -07:00
cosmo-format.el Avoid running clang-format on ggml.c 2023-05-10 14:59:33 -07:00
cosmo-platform-constants.el Update tests and CPU detection for Blink 2023-01-18 00:56:09 -08:00
cosmo-stuff.el Fix breakages in Linux-only build modes 2023-07-09 19:51:44 -07:00
cosmo.el Remove some dead code 2023-07-03 02:48:29 -07:00
javadown.el Auto-generate some documentation 2020-12-26 02:09:07 -08:00
key.py Remove _Hide keyword 2023-07-24 08:34:58 -07:00
ld-script.el Make improvements 2022-05-28 00:28:09 -07:00
optinfo-mode.el Initial import 2020-06-15 07:18:57 -07:00
protobuf-mode.el Initial import 2020-06-15 07:18:57 -07:00