| View previous topic :: View next topic |
| Author |
Message |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Wed Sep 02, 2009 4:31 am Post subject: adrs of the .rodata.sceModuleInfo file offset in prx |
|
|
i'm currently writting a elf,prx dumper according to the information found in http://hitmen.c02.at/files/yapspd/psp_doc/chap26.html#sec26.2 the adrs of the .rodata.sceModuleInfo file offset
can be found in the Program segment header in variable p_paddr (in elf format this is use for the physical adress).
according to hitmen if the prx is a kernel prx the most significant bit must be set.
Is this true with firmware > 1.5 because the doc is very outdated and if i understand good when it is a kernel prx to have the offset i must do this p_paddr & 0x7fffffff
| Code: |
here is some output of my elf/prx dumper for this program
#include <pspkernel.h>
PSP_MODULE_INFO("dummyprx", 0, 1, 2);
int main()
{
printf("Hello world");
return 0;
}
******************
* Header *
******************
Magic header :ELF
Class :1 --> 32 bits objects
data encoding :1 --> little endian
Version :1
OS ABI identification :0 --> Unix System V ABI
EI_ABIVERSION :0
Object file type :FFA0 --> PSP PRX Executable file
Architecture :8 --> MIPS R3000 big-endian
Entry point virtual address :AC
Program header table file offset :52
Section header table file offset :66100
Processor-specific flags :10A23001
ELF header size in bytes :52
Program header table entry size :32
Program header table entry count :1
Section header table entry size :40
Section header table entry count :35
Section header string table index :34
********************************
* Program Table Header *
********************************
p_type : 1 --> Loadable program segment
p_flags : 5 --> segment is executable readable
.rodata.sceModuleInfo file offset : 60640
**********************
* Module info *
**********************
Module attribute : 0
Module version : 2.1
Module name : dummyprx
Value of GP : 181C0
prx dump
|
Last edited by sauron_le_noir on Wed Sep 02, 2009 5:00 am; edited 1 time in total |
|
| Back to top |
|
 |
sauron_le_noir
Joined: 05 Jul 2008 Posts: 229
|
Posted: Wed Sep 02, 2009 4:59 am Post subject: |
|
|
Responding myself to the question if prx is a kernel prx the offset must be anded with 0x7fffffff
| Code: |
******************
* Header *
******************
Magic header :ELF
Class :1 --> 32 bits objects
data encoding :1 --> little endian
Version :1
OS ABI identification :0 --> Unix System V ABI
EI_ABIVERSION :0
Object file type :FFA0 --> PSP PRX Executable file
Architecture :8 --> MIPS R3000 big-endian
Entry point virtual address :AC
Program header table file offset :52
Section header table file offset :66100
Processor-specific flags :10A23001
ELF header size in bytes :52
Program header table entry size :32
Program header table entry count :1
Section header table entry size :40
Section header table entry count :35
Section header string table index :34
********************************
* Program Table Header *
********************************
p_type : 1 --> Loadable program segment
p_flags : 5 --> segment is executable readable
p_offset : 96
p_vaddr : 0
p_filesz : 66004
p_memsiz : 91736
p_align : 16
.rodata.sceModuleInfo file offset : -2147423008
**********************
* Module info *
**********************
Module attribute : 1000
Module version : 2.1
Module name : dummyprx
Value of GP : 0x181C0 98752
Adrs lib.ent : 0xEBFC 60412
Adrs lib.ent_btm : 0xEC0C 60428
Adrs lib.stub : 0xEC14 60436
Adrs lib.stub.btm : 0xEC78 60536
prx dump
|
|
|
| Back to top |
|
 |
|