|
ReXGlue SDK
|
#include <rex/kernel/module.h>
Classes | |
| struct | LibraryImport |
| struct | ImportLibrary |
Public Member Functions | |
| XEXModule (FunctionDispatcher *function_dispatcher, TitleRuntime &runtime) | |
| bool | IsLoaded () const |
| const filesystem::IXEXImage & | GetImage () const |
| const filesystem::PEInfo & | GetPE () const |
| u32 | GetImageSize () const override |
| u32 | GetBaseAddress () const override |
| u32 | GetEntryPoint () const override |
| u32 | GetExportTableAddress () const override |
| u32 | GetExceptionDirectoryRVA () const override |
| u32 | GetExceptionDirectorySize () const override |
| u32 | GetExceptionDirectoryAddress () const override |
| std::span< const BinarySection > | GetBinarySections () const override |
| std::span< const BinarySymbol > | GetBinarySymbols () const override |
| u32 | GetExportAddress (u16 ordinal) const |
| const std::vector< ImportLibrary > & | GetImportLibraries () const |
| u32 | GetExportAddress (const std::string_view name) const |
| int | ApplyPatch (XEXModule *module) |
| bool | Load (const std::string_view name, const std::string_view path, const void *xex_addr, size_t xex_length) |
| std::span< const u8 > | GetPendingImage () const |
| bool | LoadContinue () |
| bool | Unload () |
| const std::string & | GetName () const override |
| bool | IsExecutable () const override |
| Public Member Functions inherited from rex::kernel::GuestModule | |
| GuestModule (FunctionDispatcher *function_dispatcher) | |
| kernel::GuestAddressSpace * | GetAddressSpace () const |
| FunctionDispatcher * | GetFunctionDispatcher () const |
| bool | IsExecutableAddress (u32 address) const |
| virtual const BinarySection * | FindSectionByAddress (u32 address) const |
Additional Inherited Members | |
| Protected Attributes inherited from rex::kernel::GuestModule | |
| FunctionDispatcher * | function_dispatcher_ = nullptr |
| kernel::GuestAddressSpace * | memory_ = nullptr |
| std::vector< BinarySection > | binary_sections_ |
| std::vector< BinarySymbol > | binary_symbols_ |
A module loaded from an XEX image, or from an XEX patch image.
| rex::kernel::XEXModule::XEXModule | ( | FunctionDispatcher * | function_dispatcher, |
| TitleRuntime & | runtime ) |
Builds an unloaded module.
| function_dispatcher | The dispatcher whose memory the module loads into. |
| int rex::kernel::XEXModule::ApplyPatch | ( | XEXModule * | module | ) |
Applies this patch image to a loaded module.
|
inlineoverridevirtual |
Reimplemented from rex::kernel::GuestModule.
|
overridevirtual |
Returns the binary sections, empty by default.
Reimplemented from rex::kernel::GuestModule.
|
overridevirtual |
Returns the import symbols of the image.
Reimplemented from rex::kernel::GuestModule.
|
overridevirtual |
Reimplemented from rex::kernel::GuestModule.
|
overridevirtual |
Returns the guest address of the PDATA table in the exception data directory, 0 by default.
Reimplemented from rex::kernel::GuestModule.
|
overridevirtual |
Returns the RVA of the PDATA table in the exception data directory, 0 by default.
Reimplemented from rex::kernel::GuestModule.
|
overridevirtual |
Returns the size of the PDATA table in the exception data directory, 0 by default.
Reimplemented from rex::kernel::GuestModule.
| u32 rex::kernel::XEXModule::GetExportAddress | ( | const std::string_view | name | ) | const |
Looks up an export by name.
| u32 rex::kernel::XEXModule::GetExportAddress | ( | u16 | ordinal | ) | const |
Looks up an export by ordinal.
|
overridevirtual |
Reimplemented from rex::kernel::GuestModule.
|
overridevirtual |
Reimplemented from rex::kernel::GuestModule.
|
inlineoverridevirtual |
Implements rex::kernel::GuestModule.
|
inline |
Returns the decoded image that waits in host memory between Load and LoadContinue, empty once LoadContinue has copied the image into guest memory.
|
overridevirtual |
Reports whether the module flags mark a title module.
Implements rex::kernel::GuestModule.
| bool rex::kernel::XEXModule::Load | ( | const std::string_view | name, |
| const std::string_view | path, | ||
| const void * | xex_addr, | ||
| size_t | xex_length ) |
Parses and decodes an XEX image into host memory and reserves its guest memory.
| xex_addr | The host address of the XEX file. |
| bool rex::kernel::XEXModule::LoadContinue | ( | ) |
Parses the PE image, copies it into guest memory without its header, then registers the imports and page protections.