diff options
Diffstat (limited to 'view')
| -rw-r--r-- | view/elf/elfview.cpp | 12 | ||||
| -rw-r--r-- | view/elf/elfview.h | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/view/elf/elfview.cpp b/view/elf/elfview.cpp index d1b2beef..0e82d511 100644 --- a/view/elf/elfview.cpp +++ b/view/elf/elfview.cpp @@ -1209,10 +1209,10 @@ bool ElfView::Init() // Only handle this symbol type if the platform is a linux. Otherwise, we don't know what it is. if (GetDefaultPlatform()->GetName().rfind("linux", 0) != 0) goto unknownType; - DefineElfSymbol(FunctionSymbol, entry->name, entry->value, false, entry->binding, entry->size); + DefineElfSymbol(FunctionSymbol, entry->name, entry->value, false, entry->binding); break; case ELF_STT_FUNC: - DefineElfSymbol(FunctionSymbol, entry->name, entry->value, false, entry->binding, entry->size); + DefineElfSymbol(FunctionSymbol, entry->name, entry->value, false, entry->binding); break; case ELF_STT_TLS: /* - only create Binja symbols for .symtab (not .dynsym) symbols @@ -1539,13 +1539,13 @@ bool ElfView::Init() if (!GetSymbolByAddress(entry)) { if (section->GetName() == ".init_array") - DefineAutoSymbol(new Symbol(FunctionSymbol, "_INIT_" + std::to_string(i), entry, GlobalBinding)); + DefineElfSymbol(FunctionSymbol, "_INIT_" + std::to_string(i), entry, false, GlobalBinding); else if (section->GetName() == ".fini_array") - DefineAutoSymbol(new Symbol(FunctionSymbol, "_FINI_" + std::to_string(i), entry, GlobalBinding)); + DefineElfSymbol(FunctionSymbol, "_FINI_" + std::to_string(i), entry, false, GlobalBinding); else if (section->GetName() == ".ctors") - DefineAutoSymbol(new Symbol(FunctionSymbol, "_CTOR_" + std::to_string(i), entry, GlobalBinding)); + DefineElfSymbol(FunctionSymbol, "_CTOR_" + std::to_string(i), entry, false, GlobalBinding); else if (section->GetName() == ".dtors") - DefineAutoSymbol(new Symbol(FunctionSymbol, "_DTOR_" + std::to_string(i), entry, GlobalBinding)); + DefineElfSymbol(FunctionSymbol, "_DTOR_" + std::to_string(i), entry, false, GlobalBinding); } } } diff --git a/view/elf/elfview.h b/view/elf/elfview.h index 7df78d01..db60fdb7 100644 --- a/view/elf/elfview.h +++ b/view/elf/elfview.h @@ -515,7 +515,7 @@ namespace BinaryNinja SymbolQueue* m_symbolQueue = nullptr; void DefineElfSymbol(BNSymbolType type, const std::string& name, uint64_t addr, bool gotEntry, - BNSymbolBinding binding, size_t size, Ref<Type> typeObj=nullptr); + BNSymbolBinding binding, size_t size=0, Ref<Type> typeObj=nullptr); void ApplyTypesToParentStringTable(const Elf64SectionHeader& section, const bool offset = true); void ApplyTypesToStringTable(const Elf64SectionHeader& section, const int64_t imageBaseAdjustment, const bool offset = true); |
