diff --git a/elf.c b/elf.c index 2da5dd1..a0047d6 100644 --- a/elf.c +++ b/elf.c @@ -196,7 +196,7 @@ elfFindSymbolByAddress(struct ElfObject *obj, Elf_Addr addr, symSection->sh_offset + symSection->sh_size); for (; sym < endSym; sym++) { - if ((type == STT_NOTYPE || + if ((ELF_ST_TYPE(sym->st_info) == STT_NOTYPE || ELF_ST_TYPE(sym->st_info) == type) && sym->st_value <= addr && (shdrs[sym->st_shndx]->sh_flags & SHF_ALLOC)) {