Finds and resolves NIDs.
More...
|
- See Also
- uvl_resolve_all_loaded_modules
|
#define | RESOLVE_MOD_IMPS 0x1 |
| Add entry from import function stubs.
|
|
#define | RESOLVE_MOD_EXPS 0x2 |
| Add entry from exported information.
|
|
#define | RESOLVE_IMPS_SVC_ONLY 0x4 |
| Used with RESOLVE_MOD_IMPS but only add syscalls for import entries.
|
|
|
#define | MOD_INFO_VALID_ATTR 0x0000 |
|
#define | MOD_INFO_VALID_VER 0x0101 |
|
Finds and resolves NIDs.
Loaded module information.
Returned by sceKernelGetModuleInfo
SCE module export table.
Can be found in an ELF file or loaded in memory.
SCE module import table.
Can be found in an ELF file or loaded in memory.
SCE module information section.
Can be found in an ELF file or loaded in memory.
Resolve table entry.
This can represent either an unresolved entry from a homebrew or a resolved entry copied from a loaded module.
Get an instruction's type and immediate value.
Currently only supports ARMv7 encoding of MOV Rd, #imm, MOVT Rd, #imm, BX Rn, and SVC #imm. You should use the return value of this function to check for error but instead the value of type where INSTRUCTION_UNKNOWN
is a failure.
- Returns
- Immediate value of instruction on success, indeterminate on error
- Parameters
-
cur_inst | ARMv7 instruction |
type | See defined "Supported ARM instruction types" |
Creates an ARMv7 instruction.
Currently only supports ARMv7 encoding of MOV Rd, #imm, MOVT Rd, #imm, BX Rn, and SVC #imm. Depending on the type, not all parameters may be used.
- Returns
- ARMv7 instruction on success or 0 on failure.
- Parameters
-
type | See defined "Supported ARM instruction types" |
immed | Immediate value to encode |
reg | Register used in instruction |
Estimates an unknown syscall.
Estimates a syscall for a given NID based on information of existing syscalls in the resolve table.
- Returns
- Entry on success, NULL on error
- Parameters
-
int uvl_resolve_add_all_modules |
( |
int |
type | ) |
|
Adds entries from all loaded modules to resolve table.
- Returns
- Zero on success, otherwise error
- Parameters
-
type | An OR combination of flags (see defined "Search flags for importing loaded modules") directing the search |
Add a module's export entries to the resolve table.
- Returns
- Zero on success, otherwise error
- Parameters
-
exp_table | Module's export table |
Add a module's import table's entries to the resolve table.
A loaded module has it's stubs already resolved by the kernel. This will copy those resolved entries for our own use.
- Returns
- Zero on success, otherwise error
- Parameters
-
imp_table | Module's import table to read from |
syscalls_only | If set, will only add resolved syscalls and nothing else |
int uvl_resolve_add_module |
( |
PsvUID |
modid, |
|
|
int |
type |
|
) |
| |
Adds entries from a loaded module to resolve table.
This functions takes a loaded module and attempts to read its import and/or export table and add entries to our resolve table.
- Returns
- Zero on success, otherwise error
- Parameters
-
modid | UID of the module |
type | An OR combination of flags (see defined "Search flags for importing loaded modules") directing the search |
int uvl_resolve_entry_to_import_stub |
( |
resolve_entry_t * |
entry, |
|
|
void * |
stub |
|
) |
| |
Fills a stub with resolve entry.
- Returns
- Zero on success, otherwise error
- Parameters
-
entry | Entry to read from |
stub | Stub function to fill |
Creates resolve entry from stub function imported by a module.
Given the stub function of a loaded module that has already been resolved, extract the resolved information and write it to a resolve_entry_t
.
- Returns
- Zero on success, otherwise error
- Parameters
-
stub | Stub function to read |
nid | NID resolved by stub |
entry | Entry to write to |
Resolves an import table.
- Returns
- Zero on success, otherwise error
- Parameters
-
int uvl_resolve_loader |
( |
u32_t |
nid, |
|
|
void * |
libkernel_base, |
|
|
void * |
stub |
|
) |
| |
Resolves UVLoader imported function.
UVLoader only depends on functions exported and imported by sceLibKernel. This function is a simplified version of the main resolver and does not use and external functions.
- Returns
- Zero on success, otherwise error
Adds a resolve entry.
This function does not check for duplicates.
- Returns
- Zero on success, otherwise error
- Parameters
-
int uvl_resolve_table_destroy |
( |
| ) |
|
Frees memory for resolve table.
- Returns
- Zero on success, otherwise error
Gets a resolve entry.
This function returns the last entry in the table that has the given NID.
- Returns
- Entry on success, NULL on error
- Parameters
-
int uvl_resolve_table_initialize |
( |
| ) |
|
Allocates memory for resolve table.
- Returns
- Zero on success, otherwise error