mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-02 17:28: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
|
@ -587,10 +587,10 @@ imp 'CreateEllipticRgnIndirect' CreateEllipticRgnIndirect gdi32 1074
|
|||
imp 'CreateEnclave' CreateEnclave KernelBase 180
|
||||
imp 'CreateEnhMetaFileA' CreateEnhMetaFileA gdi32 1075
|
||||
imp 'CreateEnhMetaFile' CreateEnhMetaFileW gdi32 1076
|
||||
imp 'CreateEventA' CreateEventA kernel32 0 # KernelBase
|
||||
imp 'CreateEventExA' CreateEventExA kernel32 0 # KernelBase
|
||||
imp 'CreateEventEx' CreateEventExW kernel32 0 # KernelBase
|
||||
imp 'CreateEvent' CreateEventW kernel32 0 # KernelBase
|
||||
imp 'CreateEventA' CreateEventA kernel32 0 4 # KernelBase
|
||||
imp 'CreateEventExA' CreateEventExA kernel32 0 4 # KernelBase
|
||||
imp 'CreateEventEx' CreateEventExW kernel32 0 4 # KernelBase
|
||||
imp 'CreateEvent' CreateEventW kernel32 0 4 # KernelBase
|
||||
imp 'CreateFiber' CreateFiber kernel32 0 # KernelBase
|
||||
imp 'CreateFiberEx' CreateFiberEx kernel32 0 # KernelBase
|
||||
imp 'CreateFile' CreateFileW kernel32 0 7 # KernelBase
|
||||
|
@ -2384,8 +2384,8 @@ imp 'GetOsSafeBootMode' GetOsSafeBootMode KernelBase 626
|
|||
imp 'GetOutlineTextMetricsA' GetOutlineTextMetricsA gdi32 1685
|
||||
imp 'GetOutlineTextMetrics' GetOutlineTextMetricsW gdi32 1686
|
||||
imp 'GetOverlappedAccessResults' GetOverlappedAccessResults advapi32 1348
|
||||
imp 'GetOverlappedResult' GetOverlappedResult kernel32 0 # KernelBase
|
||||
imp 'GetOverlappedResultEx' GetOverlappedResultEx kernel32 0 # KernelBase
|
||||
imp 'GetOverlappedResult' GetOverlappedResult kernel32 0 4 # KernelBase
|
||||
imp 'GetOverlappedResultEx' GetOverlappedResultEx kernel32 0 5 # KernelBase
|
||||
imp 'GetPackageApplicationContext' GetPackageApplicationContext KernelBase 629
|
||||
imp 'GetPackageApplicationIds' GetPackageApplicationIds kernel32 0 # KernelBase
|
||||
imp 'GetPackageApplicationProperty' GetPackageApplicationProperty KernelBase 631
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue