binaryen
binaryen copied to clipboard
How to traverse memory segments and get their data?
I'm using binary-c API. I need to read modules from arbitrary binaries and do some analysis on them, including analyzing their data sections.
I find BinaryenCopyMemorySegmentData(BinaryenModuleRef module, const char* segmentName, char* buffer), but this requires segmentName, which I can't determine for an arbitrary binary. I don't find any API like BinaryenGetMemorySegmentByIndex or BinaryenMemorySegmentGetName just like those for functions.