capstone: disassemble .text also for STT_NOTYPE

Symbol type FUNC (STT_FUNC, "code object") seems not to suffice when parts
of the disassembled binary come from assembler source files.  We try to
disassemble STT_NOTYPE (symbol type "unspecified") as well now.

Change-Id: I582190900e66d6af0779dfaf3b569f0e157e9ce7
This commit is contained in:
Horst Schirmeier
2020-05-23 22:20:01 +02:00
parent 33d40df4bd
commit 0c38fd7345

View File

@ -34,6 +34,7 @@ std::map<uint64_t, uint64_t> CapstoneDisassembler::get_symtab_map(uint64_t sect_
for (ElfReader::container_t::const_iterator it = m_elf->sym_begin(); it != m_elf->sym_end(); ++it) {
if (it->getSymbolType() != 2 /*SST_FUNC*/) {
if (it->getSymbolType() != STT_FUNC && it->getSymbolType() != STT_NOTYPE) {
continue;
}