From 9537f33da6b8de883a45c4b7758f0dc5c1438ed7 Mon Sep 17 00:00:00 2001 From: Zichuan Li Date: Tue, 21 May 2024 17:56:03 -0400 Subject: Solved issue #1180 by adding new APIs 1. Add two new APIs for multiple entry functions `GetAllAnalysisEntryFunctions` and `AddToEntryFunctions` 2. Add Python APIs `entry_functions` and `add_to_entry_functions`. `entry_functions` resturns a list of functions, which supports parsing functions in `init_array`, `fini_array` and TLS callbacks. 3. Modify bin-info, it now prints all entry functions --- examples/bin-info/src/bin-info.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'examples/bin-info/src/bin-info.cpp') diff --git a/examples/bin-info/src/bin-info.cpp b/examples/bin-info/src/bin-info.cpp index b952694d..8e920156 100644 --- a/examples/bin-info/src/bin-info.cpp +++ b/examples/bin-info/src/bin-info.cpp @@ -58,6 +58,13 @@ int main(int argc, char* argv[]) cout << "PLATFORM: " << bv->GetDefaultPlatform()->GetName() << endl; cout << endl; + cout << "------ALL ENTRY FUNCTIONS---------" << endl; + for (auto func : bv->GetAllEntryFunctions()) + { + cout << hex << func->GetStart() << " " << func->GetSymbol()->GetFullName() << endl; + } + cout << endl; + cout << "---------- 10 Functions ----------" << endl; int x = 0; for (auto func : bv->GetAnalysisFunctionList()) -- cgit v1.3.1