diff --git a/libr/bin/format/elf/elf.c b/libr/bin/format/elf/elf.c index 44e7dcfcb595e..6c090bbfe7bec 100644 --- a/libr/bin/format/elf/elf.c +++ b/libr/bin/format/elf/elf.c @@ -2165,7 +2165,7 @@ ut64 Elf_(get_main_offset)(ELFOBJ *eo) { // non-thumb entry points if (!memcmp (buf, "\x00\xb0\xa0\xe3\x00\xe0\xa0\xe3", 8)) { if (buf[0x40 + 2] == 0xff && buf[0x40 + 3] == 0xeb) { - // nothing may happen + // nothing to do } else if (!memcmp (buf + 0x28 + 2, "\xff\xeb", 2)) { return Elf_(v2p) (eo, r_read_le32 (&buf[0x34]) & ~1); } @@ -4375,6 +4375,7 @@ RBinSymbol *Elf_(convert_symbol)(ELFOBJ *eo, RBinElfSymbol *symbol) { ptr->bind = symbol->bind; ptr->type = symbol->type; ptr->is_imported = symbol->is_imported; + // ptr->is_internal = symbol->is_internal; ptr->paddr = paddr; ptr->vaddr = vaddr; ptr->size = symbol->size; diff --git a/libr/bin/format/elf/elf.h b/libr/bin/format/elf/elf.h index 997f96473e2c7..f95deefd45c46 100644 --- a/libr/bin/format/elf/elf.h +++ b/libr/bin/format/elf/elf.h @@ -61,6 +61,7 @@ typedef struct r_bin_elf_symbol_t { bool is_sht_null; bool is_vaddr; /* when true, offset is virtual address, otherwise it's physical */ bool is_imported; + bool is_internal; } RBinElfSymbol; typedef struct r_bin_elf_reloc_t { diff --git a/libr/bin/p/bin_elf.inc.c b/libr/bin/p/bin_elf.inc.c index 734ca50f59274..607a9777bf627 100644 --- a/libr/bin/p/bin_elf.inc.c +++ b/libr/bin/p/bin_elf.inc.c @@ -431,6 +431,9 @@ static RList* imports(RBinFile *bf) { RBinElfSymbol *is; R_VEC_FOREACH (imports, is) { + if (is->is_internal) { + continue; + } RBinImport *ptr = R_NEW0 (RBinImport); if (!ptr) { break;