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:
Justine Tunney 2020-11-09 15:41:11 -08:00
parent 95bc650be8
commit aea89fe832
70 changed files with 1037 additions and 456 deletions

View file

@ -537,7 +537,8 @@ HIDDEN(.Lape.bss.align = .Lape.data.align);
/* Program Loader Auto-Tune */
HIDDEN(v_ape_realsectors =
MIN(REAL_SCRATCH_AREA - IMAGE_BASE_REAL,
ROUNDUP(RVA(_edata), 512)) / 512);
ROUNDUP(RVA(_edata), 4096)) / 512);
HIDDEN(v_ape_realpages = v_ape_realsectors / (4096 / 512));
HIDDEN(v_ape_highsectors =
(ROUNDUP(RVA(_edata), 512) / 512) - v_ape_realsectors);