mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-06-03 03:02:28 +00:00
Make minor improvements
- Work towards simplifying ape.S startup process - Rewrote ar because it took minutes to build cosmopolitan.a
This commit is contained in:
parent
95bc650be8
commit
aea89fe832
70 changed files with 1037 additions and 456 deletions
|
@ -25,12 +25,11 @@ textreal static void __map_segment(uint64_t k, uint64_t a, uint64_t b) {
|
|||
uint64_t *e;
|
||||
for (; a < b; a += 0x1000) {
|
||||
e = getpagetableentry(IMAGE_BASE_VIRTUAL + a, 3, &g_pml4t, &g_ptsp_xlm);
|
||||
*e = (IMAGE_BASE_PHYSICAL + a) | k;
|
||||
*e = (IMAGE_BASE_REAL + a) | k;
|
||||
}
|
||||
}
|
||||
|
||||
textreal void __map_image(void) {
|
||||
pageunmap(0);
|
||||
__map_segment(PAGE_V | PAGE_U, 0, (uintptr_t)_etext - IMAGE_BASE_VIRTUAL);
|
||||
__map_segment(PAGE_V | PAGE_U | PAGE_RW | PAGE_XD,
|
||||
(uintptr_t)_etext - IMAGE_BASE_VIRTUAL,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue