Writing an IDA Loader Using the SDK

IDA’s principle interface to any loader module takes place via a global loader_t object that each loader must declare and export. The loader_t struct is analogous to the plugin_t class used in plug-in modules. The following listing shows the layout of the loader_t struct as defined in loader.hpp.

struct loader_t { ulong version; // api version, should be IDP_INTERFACE_VERSION ulong flags; // loader flags //check input file format. if recognized, int (idaapi *accept_file)(linput_t *li, char fileformatname[MAX_FILE_FORMAT_NAME], int n); //load file into the database. void (idaapi *load_file)(linput_t *li, ushort neflags, const char *fileformatname); //create output file from the database, this function may be absent. ...

Get The IDA Pro Book, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.