aboutsummaryrefslogtreecommitdiffhomepage
path: root/obj
diff options
context:
space:
mode:
authorlemon <lsof@mailbox.org>2025-12-09 19:20:01 +0100
committerlemon <lsof@mailbox.org>2025-12-09 19:20:01 +0100
commit600d94645e128dc88fdb9a2b6d42a5b49a138fd5 (patch)
tree63f88d21abc7469cb751aa08cb51383a5adc23ca /obj
parentc2833c1c84481aea0008898486263f33f65c353d (diff)
elf: initialize str hashtable to a nicer size
Diffstat (limited to 'obj')
-rw-r--r--obj/elf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/obj/elf.c b/obj/elf.c
index 771d3c0..8defab8 100644
--- a/obj/elf.c
+++ b/obj/elf.c
@@ -63,6 +63,7 @@ str2idx(const char *s)
static pmap_of(uint) ht;
uint *p, i;
+ if (!ht.v) pmap_init(&ht, 1<<8);
if ((p = pmap_get(&ht, s))) return *p;
if (!strs.n) vpush(&strs, 0);
i = strs.n;