mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-01-31 19:43:32 +00:00
559b024e1d
We can now link even smaller Python binaries. For example, the hello.com program in the Python build directory is a compiled linked executable of hello.py which just prints hello world. Using decentralized sections, we can make that binary 1.9mb in size (noting that python.com is 6.3 megs!) This works for nontrivial programs too. For example, say we want an APE binary that's equivalent to python.com -m http.server. Our makefile now builds such a binary using the new launcher and it's only 3.2mb in size since Python sources get turned into ELF objects, which tell our linker that we need things like native hashing algorithm code.
14 lines
607 B
C
14 lines
607 B
C
#ifndef COSMOPOLITAN_THIRD_PARTY_PYTHON_MODULES_WINREPARSE_H_
|
|
#define COSMOPOLITAN_THIRD_PARTY_PYTHON_MODULES_WINREPARSE_H_
|
|
#include "libc/nt/struct/reparsedatabuffer.h"
|
|
#if !(__ASSEMBLER__ + __LINKER__ + 0)
|
|
|
|
#define _Py_REPARSE_DATA_BUFFER struct NtReparseDataBuffer
|
|
#define _Py_PREPARSE_DATA_BUFFER struct NtReparseDataBuffer*
|
|
|
|
#define _Py_REPARSE_DATA_BUFFER_HEADER_SIZE \
|
|
offsetof(_Py_REPARSE_DATA_BUFFER, GenericReparseBuffer)
|
|
#define _Py_MAXIMUM_REPARSE_DATA_BUFFER_SIZE (16 * 1024)
|
|
|
|
#endif /* !(__ASSEMBLER__ + __LINKER__ + 0) */
|
|
#endif /* COSMOPOLITAN_THIRD_PARTY_PYTHON_MODULES_WINREPARSE_H_ */
|