mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-05 02:38:31 +00:00
Get life.com in MODE=tiny back down to 12kb
This commit is contained in:
parent
23b72eb617
commit
b90fa996b4
14 changed files with 199 additions and 72 deletions
|
@ -2,11 +2,11 @@
|
|||
.imp kernel32,__imp_CreateFileMappingW,CreateFileMappingW,0
|
||||
|
||||
.text.windows
|
||||
CreateFileMapping:
|
||||
__CreateFileMapping:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov __imp_CreateFileMappingW(%rip),%rax
|
||||
jmp __sysv2nt8
|
||||
.endfn CreateFileMapping,globl
|
||||
jmp __sysv2nt6
|
||||
.endfn __CreateFileMapping,globl
|
||||
.previous
|
||||
|
|
|
@ -1,2 +1,12 @@
|
|||
.include "o/libc/nt/codegen.inc"
|
||||
.imp kernel32,__imp_MapViewOfFileEx,MapViewOfFileEx,0
|
||||
|
||||
.text.windows
|
||||
__MapViewOfFileEx:
|
||||
push %rbp
|
||||
mov %rsp,%rbp
|
||||
.profilable
|
||||
mov __imp_MapViewOfFileEx(%rip),%rax
|
||||
jmp __sysv2nt6
|
||||
.endfn __MapViewOfFileEx,globl
|
||||
.previous
|
||||
|
|
|
@ -580,10 +580,11 @@ imp 'CreateFiber' CreateFiber kernel32 0 # KernelBase
|
|||
imp 'CreateFiberEx' CreateFiberEx kernel32 0 # KernelBase
|
||||
imp 'CreateFileA' CreateFileA kernel32 0 7 # KernelBase
|
||||
imp '__CreateFile' CreateFileW kernel32 0 7 # KernelBase
|
||||
imp '__CreateFileMapping' CreateFileMappingW kernel32 0 6 # KernelBase
|
||||
imp '__CreateFileMappingNuma' CreateFileMappingNumaW kernel32 0 7 # Kernelbase
|
||||
imp '__MapViewOfFileEx' MapViewOfFileEx kernel32 0 6 # KernelBase
|
||||
imp '__MapViewOfFileExNuma' MapViewOfFileExNuma kernel32 0 7 # KernelBase
|
||||
imp 'CreateFileMappingNumaA' CreateFileMappingNumaA kernel32 198 7
|
||||
imp 'CreateFileMapping' CreateFileMappingW kernel32 0 7 # KernelBase
|
||||
imp 'CreateFileMappingA' CreateFileMappingA kernel32 196 7
|
||||
imp 'CreateFileTransacted' CreateFileTransactedW kernel32 202
|
||||
imp 'CreateFileTransactedA' CreateFileTransactedA kernel32 201
|
||||
|
@ -3339,7 +3340,6 @@ imp 'MapUserPhysicalPagesScatter' MapUserPhysicalPagesScatter kernel32 986
|
|||
imp 'MapViewOfFile' MapViewOfFile kernel32 0 # KernelBase
|
||||
imp 'MapViewOfFile3' MapViewOfFile3 KernelBase 1003
|
||||
imp 'MapViewOfFile3FromApp' MapViewOfFile3FromApp KernelBase 1004
|
||||
imp 'MapViewOfFileEx' MapViewOfFileEx kernel32 0 # KernelBase
|
||||
imp 'MapViewOfFileFromApp' MapViewOfFileFromApp kernel32 0 # KernelBase
|
||||
imp 'MapViewOfFileNuma2' MapViewOfFileNuma2 KernelBase 1008
|
||||
imp 'MapVirtualKeyA' MapVirtualKeyA user32 2153
|
||||
|
|
|
@ -36,18 +36,26 @@ COSMOPOLITAN_C_START_
|
|||
|
||||
void *LocalFree(void *hMem);
|
||||
|
||||
int64_t CreateFileMapping(
|
||||
int64_t opt_hFile,
|
||||
const struct NtSecurityAttributes *opt_lpFileMappingAttributes,
|
||||
uint32_t flProtect, uint32_t dwMaximumSizeHigh, uint32_t dwMaximumSizeLow,
|
||||
const char16_t *opt_lpName);
|
||||
int64_t CreateFileMappingNuma(
|
||||
int64_t opt_hFile /* -1ul is MAP_ANONYMOUS */,
|
||||
int64_t opt_hFile,
|
||||
const struct NtSecurityAttributes *opt_lpFileMappingAttributes,
|
||||
uint32_t flProtect, uint32_t dwMaximumSizeHigh, uint32_t dwMaximumSizeLow,
|
||||
const char16_t *opt_lpName, uint32_t nndDesiredNumaNode);
|
||||
|
||||
void *MapViewOfFileExNuma(
|
||||
int64_t hFileMappingObject, /* @see CreateFileMapping() */
|
||||
uint32_t dwDesiredAccess, uint32_t dwFileOffsetHigh, /* high order bits */
|
||||
uint32_t dwFileOffsetLow, /* low order bits */
|
||||
size_t dwNumberOfBytesToMap, void *opt_lpDesiredBaseAddress,
|
||||
uint32_t nndDesiredNumaNode);
|
||||
void *MapViewOfFileEx(int64_t hFileMappingObject, uint32_t dwDesiredAccess,
|
||||
uint32_t dwFileOffsetHigh, uint32_t dwFileOffsetLow,
|
||||
size_t dwNumberOfBytesToMap,
|
||||
void *opt_lpDesiredBaseAddress);
|
||||
void *MapViewOfFileExNuma(int64_t hFileMappingObject, uint32_t dwDesiredAccess,
|
||||
uint32_t dwFileOffsetHigh, uint32_t dwFileOffsetLow,
|
||||
size_t dwNumberOfBytesToMap,
|
||||
void *opt_lpDesiredBaseAddress,
|
||||
uint32_t nndDesiredNumaNode);
|
||||
|
||||
bool32 UnmapViewOfFile(const void *lpBaseAddress);
|
||||
bool32 FlushViewOfFile(const void *lpBaseAddress,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue