diff options
Diffstat (limited to '')
-rw-r--r-- | mld/symtab.c | 5 | ||||
-rw-r--r-- | mld/vgcore.4024670 | bin | 0 -> 8847360 bytes |
2 files changed, 3 insertions, 2 deletions
diff --git a/mld/symtab.c b/mld/symtab.c index 5abad2a..992802c 100644 --- a/mld/symtab.c +++ b/mld/symtab.c @@ -55,12 +55,13 @@ int symtab_get(struct symbol_table *symtab, Elf32_Sym **res, const char *name, const char *symname = symtab->strtab->data + B32(sym->st_name); if (strcmp(name, symname) != 0) continue; - // only allow retrevial of local variables from the // same object if (sym->st_info >> 4 != STB_GLOBAL && symtab->map != NULL && obj_idx >= 0) { - struct object *obj = symtab->map->meta[i]; + // we need to change the index by one since + // symbol tables always start will a NULl symbol + struct object *obj = symtab->map->meta[i - 1]; if (obj->index != (uint32_t)obj_idx) continue; } else if (obj_idx < 0 && sym->st_info >> 4 != STB_GLOBAL) { diff --git a/mld/vgcore.4024670 b/mld/vgcore.4024670 Binary files differnew file mode 100644 index 0000000..4c6b5c4 --- /dev/null +++ b/mld/vgcore.4024670 |