IDA SDK
|
Loader description block - must be exported from the loader module.
Public Attributes | |
uint32 | version |
api version, should be IDP_INTERFACE_VERSION | |
uint32 | flags |
Loader flags | |
int(idaapi * | accept_file )(qstring *fileformatname, qstring *processor, linput_t *li, const char *filename) |
Check input file format. More... | |
void(idaapi * | load_file )(linput_t *li, ushort neflags, const char *fileformatname) |
Load file into the database. More... | |
int(idaapi * | save_file )(FILE *fp, const char *fileformatname) |
Create output file from the database. More... | |
int(idaapi * | move_segm )(ea_t from, ea_t to, asize_t size, const char *fileformatname) |
Take care of a moved segment (fix up relocations, for example). More... | |
int(idaapi * | process_archive )(qstring *temp_file, linput_t *li, qstring *module_name, ushort *neflags, const char *fileformatname, const char *defmember, qstring *errbuf) |
Display list of archive members and let the user select one. More... | |
int(idaapi * loader_t::accept_file) (qstring *fileformatname, qstring *processor, linput_t *li, const char *filename) |
Check input file format.
This function will be called one or more times depending on the result value.
[out] | fileformat | name of file format |
[out] | processor | desired processor (optional) |
li | input file | |
filename | name of the input file, if it is an archive member name then the actual file doesn't exist |
void(idaapi * loader_t::load_file) (linput_t *li, ushort neflags, const char *fileformatname) |
Load file into the database.
li | input file |
neflags | Load file flags |
fileformatname | name of type of the file (it was returned by accept_file) |
If this function fails, loader_failure() should be called
int(idaapi * loader_t::save_file) (FILE *fp, const char *fileformatname) |
Create output file from the database.
This function may be absent. If fp == nullptr, then this function returns:
If fp != nullptr, then this function should create the output file
int(idaapi * loader_t::move_segm) (ea_t from, ea_t to, asize_t size, const char *fileformatname) |
Take care of a moved segment (fix up relocations, for example).
This function may be absent. A special calling method
means that the whole program has been moved in the memory (rebased) by delta bytes
from | previous linear address of the segment |
to | current linear address of the segment |
size | size of the moved segment |
fileformatname | the file format |
1 | ok |
0 | failure |
int(idaapi * loader_t::process_archive) (qstring *temp_file, linput_t *li, qstring *module_name, ushort *neflags, const char *fileformatname, const char *defmember, qstring *errbuf) |
Display list of archive members and let the user select one.
Extract the selected archive member into a temporary file.
[out] | temp_file | name of the file with the extracted archive member. |
li | input file | |
[in,out] | module_name | in: name of archive out: name of the extracted archive member |
[in,out] | neflags | Load file flags |
fileformatname | name of type of the file (it was returned by accept_file) | |
defmember | extract the specified member, for example "subdir/member.exe", may be nullptr | |
errbuf | error message if 0 is returned, may be nullptr |