Hi all,
I see that some programs don't have .IRX files but load modules anyway.
I deduce they are included in the .ELF file.
I saw that in the Altimit project, but when reading source code, i don't know how it loads module.
Can someone tell me how does it works ?
thx
How to include IRX files in .ELF ?
1) produce a .s file out of the irx file:
2) declare the module into your C code:
3) load the module into your C code:
4) don't forget to compile the .s file with your C code:
Code: Select all
bin2s my_module.irx my_module.s my_module
2) declare the module into your C code:
Code: Select all
extern unsigned char my_module[];
extern unsigned int size_my_module;
3) load the module into your C code:
Code: Select all
int ret;
SifExecModuleBuffer(my_module, size_my_module, 0, NULL, &ret);
4) don't forget to compile the .s file with your C code:
Code: Select all
ee-gcc -o final_binary.elf my_code.c my_module.s
pixel: A mischievous magical spirit associated with screen displays. The computer industry has frequently borrowed from mythology. Witness the sprites in computer graphics, the demons in artificial intelligence and the trolls in the marketing department.
ok thanks a lot for your quick and very precise answer.
However i still have a problem.
I downloaded Altimit 0.1 (src and bin) ans when i compile sources, i don't have the same size as the original ELF (this last works)
Mine is 328 Ko (uncompressed) whereas the original is 1 Mb
What am i doing wrong
However i still have a problem.
I downloaded Altimit 0.1 (src and bin) ans when i compile sources, i don't have the same size as the original ELF (this last works)
Mine is 328 Ko (uncompressed) whereas the original is 1 Mb
What am i doing wrong
-
- Posts: 564
- Joined: Sat Jan 17, 2004 10:22 am
- Location: Sweden
- Contact: