ld: resolve: search all images for symbols, rather than just direct links

This commit is contained in:
2026-03-22 19:05:47 +00:00
parent 44cd6c551a
commit 3e0fdb616c
5 changed files with 251 additions and 47 deletions

View File

@@ -39,7 +39,11 @@ uintptr_t dl_runtime_resolve(struct elf_image *img, unsigned long sym_id)
img->e_leaf.l_name,
sym_id,
sym_name);
#if 0
virt_addr_t sym_addr = elf_image_find_linked_symbol(img, sym_name);
#else
virt_addr_t sym_addr = find_global_symbol(sym_name);
#endif
kern_tracef("symbol %s = %zx", sym_name, sym_addr);
kern_tracef("slot %s = %zx", sym_name, &got[slot_id]);
got[slot_id] = sym_addr;