mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-28 07:18:30 +00:00
Decentralize Python native module linkage
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.
This commit is contained in:
parent
dfa0359b50
commit
559b024e1d
129 changed files with 2798 additions and 13514 deletions
|
@ -68,19 +68,19 @@ bool32 CallNamedPipe(const char16_t *lpNamedPipeName, void *lpInBuffer,
|
|||
uint32_t nOutBufferSize, uint32_t *lpBytesRead,
|
||||
uint32_t nTimeOut);
|
||||
|
||||
bool32 ConnectNamedPipe(int64_t *hNamedPipe, struct NtOverlapped *lpOverlapped);
|
||||
bool32 ConnectNamedPipe(int64_t hNamedPipe, struct NtOverlapped *lpOverlapped);
|
||||
bool32 WaitNamedPipe(const char16_t *lpNamedPipeName, uint32_t nTimeOut);
|
||||
bool32 DisconnectNamedPipe(int64_t *hNamedPipe);
|
||||
bool32 DisconnectNamedPipe(int64_t hNamedPipe);
|
||||
|
||||
bool32 SetNamedPipeHandleState(int64_t *hNamedPipe, uint32_t *lpMode,
|
||||
bool32 SetNamedPipeHandleState(int64_t hNamedPipe, uint32_t *lpMode,
|
||||
uint32_t *lpMaxCollectionCount,
|
||||
uint32_t *lpCollectDataTimeout);
|
||||
|
||||
bool32 PeekNamedPipe(int64_t *hNamedPipe, void *lpBuffer, uint32_t nBufferSize,
|
||||
bool32 PeekNamedPipe(int64_t hNamedPipe, void *lpBuffer, uint32_t nBufferSize,
|
||||
uint32_t *lpBytesRead, uint32_t *lpTotalBytesAvail,
|
||||
uint32_t *lpBytesLeftThisMessage);
|
||||
|
||||
bool32 TransactNamedPipe(int64_t *hNamedPipe, void *lpInBuffer,
|
||||
bool32 TransactNamedPipe(int64_t hNamedPipe, void *lpInBuffer,
|
||||
uint32_t nInBufferSize, void *lpOutBuffer,
|
||||
uint32_t nOutBufferSize, uint32_t *lpBytesRead,
|
||||
struct NtOverlapped *lpOverlapped);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue