|
IDA C++ SDK 9.2
|
Loader description block - must be exported from the loader module. More...
#include <loader.hpp>
Public Member Functions | |
| int (idaapi *accept_file)(qstring *fileformatname | |
| Check input file format. | |
| void (idaapi *load_file)(linput_t *li | |
| Load file into the database. | |
| int (idaapi *save_file)(FILE *fp | |
| Create output file from the database. | |
| int (idaapi *move_segm)(ea_t from | |
| Take care of a moved segment (fix up relocations, for example). | |
| int (idaapi *process_archive)(qstring *temp_file | |
| Display list of archive members and let the user select one. | |
Public Attributes | |
| uint32 | version |
| api version, should be #IDP_INTERFACE_VERSION | |
| uint32 | flags |
| Loader flags | |
| qstring * | processor |
| qstring linput_t * | li |
| qstring linput_t const char * | filename |
| ushort | neflags |
| ushort const char * | fileformatname |
| const char * | fileformatname |
| ea_t | to |
| ea_t asize_t | size |
| ea_t asize_t const char * | fileformatname |
| linput_t * | li |
| linput_t qstring * | module_name |
| linput_t qstring ushort * | neflags |
| linput_t qstring ushort const char * | fileformatname |
| linput_t qstring ushort const char const char * | defmember |
| linput_t qstring ushort const char const char qstring * | errbuf |
Loader description block - must be exported from the loader module.
| loader_t::int | ( | idaapi * | accept_file | ) |
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 |
| loader_t::void | ( | idaapi * | load_file | ) |
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
| loader_t::int | ( | idaapi * | save_file | ) |
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
| loader_t::int | ( | idaapi * | move_segm | ) |
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 |
| loader_t::int | ( | idaapi * | process_archive | ) |
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 |
| uint32 loader_t::version |
api version, should be #IDP_INTERFACE_VERSION
| uint32 loader_t::flags |
| qstring* loader_t::processor |
| qstring linput_t* loader_t::li |
| qstring linput_t const char* loader_t::filename |
| ushort loader_t::neflags |
| ushort const char* loader_t::fileformatname |
| const char* loader_t::fileformatname |
| ea_t loader_t::to |
| linput_t* loader_t::li |
| linput_t qstring* loader_t::module_name |