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

@ -39,8 +39,8 @@ struct SymbolTable *OpenSymbolTable(const char *filename) {
t = MAP_FAILED;
if (filename && (t = mapanon(BIGPAGESIZE)) != MAP_FAILED &&
mapelfread(filename, &t->mf) &&
(t->name_base = getelfstringtable(t->elf, t->elfsize)) != NULL &&
(symtab = getelfsymboltable(t->elf, t->elfsize, &t->count)) &&
(t->name_base = GetElfStringTable(t->elf, t->elfsize)) != NULL &&
(symtab = GetElfSymbolTable(t->elf, t->elfsize, &t->count)) &&
sizeof(struct SymbolTable) + sizeof(struct Symbol) * t->count <
(t->scratch = BIGPAGESIZE)) {
getelfvirtualaddressrange(t->elf, t->elfsize, &t->addr_base, &t->addr_end);