mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-07-01 08:48:29 +00:00
Make fixes, improvements, and chibicc python bindings
- python now mixes audio 10x faster - python octal notation is restored - chibicc now builds code 3x faster - chibicc now has help documentation - chibicc can now generate basic python bindings - linenoise now supports some paredit-like features See #141
This commit is contained in:
parent
28997f3acb
commit
7061c79c22
121 changed files with 5272 additions and 1928 deletions
|
@ -215,7 +215,7 @@ static void Spawn(int os, int fd, long *sp, char *b, struct Elf64_Ehdr *e) {
|
|||
return;
|
||||
}
|
||||
prot = 0;
|
||||
flags = MAP_FIXED;
|
||||
flags = MAP_FIXED | MAP_PRIVATE;
|
||||
if (p[i].p_flags & PF_R) {
|
||||
prot |= PROT_READ;
|
||||
}
|
||||
|
@ -229,13 +229,12 @@ static void Spawn(int os, int fd, long *sp, char *b, struct Elf64_Ehdr *e) {
|
|||
}
|
||||
if (p[i].p_memsz > p[i].p_filesz) {
|
||||
if (Mmap(os, p[i].p_vaddr + p[i].p_filesz, p[i].p_memsz - p[i].p_filesz,
|
||||
prot, flags | MAP_PRIVATE | MAP_ANONYMOUS, -1, 0) < 0) {
|
||||
prot, flags | MAP_ANONYMOUS, -1, 0) < 0) {
|
||||
Log(os, "bss mmap failed\n");
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (p[i].p_filesz) {
|
||||
flags |= prot & PROT_WRITE ? MAP_PRIVATE : MAP_SHARED;
|
||||
if (Mmap(os, p[i].p_vaddr, p[i].p_filesz, prot, flags, fd,
|
||||
p[i].p_offset) < 0) {
|
||||
Log(os, "image mmap failed\n");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue