mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-29 14:00:29 +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
|
@ -36,7 +36,7 @@
|
|||
|
||||
#define pagesz 16384
|
||||
#define SYSLIB_MAGIC ('s' | 'l' << 8 | 'i' << 16 | 'b' << 24)
|
||||
#define SYSLIB_VERSION 7
|
||||
#define SYSLIB_VERSION 8
|
||||
|
||||
struct Syslib {
|
||||
int magic;
|
||||
|
@ -891,6 +891,7 @@ int main(int argc, char **argv, char **envp) {
|
|||
M->lib.pthread_jit_write_protect_supported_np =
|
||||
pthread_jit_write_protect_supported_np;
|
||||
M->lib.pthread_jit_write_protect_np = pthread_jit_write_protect_np_workaround;
|
||||
M->lib.sys_icache_invalidate = sys_icache_invalidate;
|
||||
M->lib.pthread_create = pthread_create;
|
||||
M->lib.pthread_exit = pthread_exit;
|
||||
M->lib.pthread_kill = pthread_kill;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue