-
Notifications
You must be signed in to change notification settings - Fork 213
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ghidra: BinExport: link CallGraph.Vertex messages to Module messages #126
Comments
It would be useful to link the functions to |
closed by 39f6445 |
@cblichmann I still don't quite understand the difference between a library and a module. Would you please explain a bit when to use one versus the other (or both)? From the vertex documentation: // If this is a library function, what is its index in library arrays.
optional int32 library_index = 5;
// If module name, such as class name for DEX files, is present - index in
// module table.
optional int32 module_index = 6; And the definitions for the two message types: message Library {
// If this library is statically linked.
optional bool is_static = 1;
// Address where this library was loaded, 0 if unknown.
optional uint64 load_address = 2 [default = 0];
// Name of the library (format is platform-dependent).
optional string name = 3;
}
message Module {
// Name, such as Java class name. Platform-dependent.
optional string name = 1;
} From this, my impression is that a library tracks units of code/data, such as an ELF shared object or PE DLL (when With this in mind, when a PE file refers to However, as far as I can tell, and corroborated by @mike-hunhoff above, the IDA extractor doesn't appear to use library entries and seems to put dynamically linked library names into module entries: binexport/ida/flow_analysis.cc Lines 416 to 427 in 39f6445
How is my understanding of the types above? Is it correct or are they meant to be used in different ways? And, does the IDA extractor behave as expected? When this discussion is resolved, I'd be happy to update the protobuf documentation to better explain how producers and consumers should use this data. |
@cblichmann polite bump |
Ghidra's extension does not link
CallGraph.Vertex
messages toModule
messages for imported functions e.g.kernel32.ReadFile
. Truly I'm not sure ifCallGraph.Vertex
messages representing imported functions should be linked toModule
orLibrary
messages. The IDA plugin links them toModule
messages. @cblichmann can you provide additional insight here?The text was updated successfully, but these errors were encountered: