mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-30 14:30:27 +00:00
Improve dlopen() on Apple Silicon
- Introduce MAP_JIT which is zero on other platforms - Invent __jit_begin() and __jit_end() which wrap Apple's APIs - Runtime dispatch to sys_icache_invalidate() in __clear_cache()
This commit is contained in:
parent
7a9e176ecf
commit
529cb4817c
20 changed files with 120 additions and 117 deletions
2
libc/sysv/consts/MAP_JIT.S
Normal file
2
libc/sysv/consts/MAP_JIT.S
Normal file
|
@ -0,0 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon mmap,MAP_JIT,0,0,0,0x00000800,0,0,0,0
|
|
@ -1,2 +1,2 @@
|
|||
#include "libc/sysv/consts/syscon.internal.h"
|
||||
.syscon rlimit,RLIMIT_AS,9,9,5,5,10,2,10,0
|
||||
.syscon rlimit,RLIMIT_AS,9 ,9,5,5,10,2,10,0
|
||||
|
|
|
@ -14,6 +14,7 @@ extern const int MAP_FIXED;
|
|||
extern const int MAP_FIXED_NOREPLACE;
|
||||
extern const int MAP_HASSEMAPHORE;
|
||||
extern const int MAP_INHERIT;
|
||||
extern const int MAP_JIT;
|
||||
extern const int MAP_LOCKED;
|
||||
extern const int MAP_NONBLOCK;
|
||||
extern const int MAP_NORESERVE;
|
||||
|
@ -43,5 +44,4 @@ COSMOPOLITAN_C_END_
|
|||
#define MAP_ANON MAP_ANONYMOUS
|
||||
#define MAP_NOCORE MAP_CONCEAL
|
||||
|
||||
|
||||
#endif /* COSMOPOLITAN_LIBC_SYSV_CONSTS_MAP_H_ */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue