sceKernelLoadExec()

Discuss the development of new homebrew software, tools and libraries.

Moderators: cheriff, TyRaNiD

Post Reply
m0skit0
Posts: 191
Joined: Tue Jun 02, 2009 8:58 pm

sceKernelLoadExec()

Post by m0skit0 »

What does exactly sceKernelLoadExec() do?

It does security checks, extracts the ELF, load program section in memory, resolves stubs, jump to entry point... Am I missing something here?

Thanks in advance :)
The Incredible Bill Gates wrote:The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers.
Dariusc123456
Posts: 388
Joined: Tue Aug 12, 2008 12:46 am

Post by Dariusc123456 »

Its really use to execute psp programs. Commonly, its use in Sony Updator, and executing of eboot games. Its use sometimes in VSH mode, exploits (tiff in 2.00-2.80) to execute things from the flash, or the memory stick.

If you take a alook at the m33 sdk samples (3.40 OE source or 4.01m33), you can see how they are used.
PSHN - Playstation Hacking Network
PSX/PS1 - HACK - Game Shark
PS2 - HACK - Swap
PSP - HACK - Pandora
PS3 - ?
m0skit0
Posts: 191
Joined: Tue Jun 02, 2009 8:58 pm

Post by m0skit0 »

Thanks Dariusc123456, but I already know how to use the function. The point is knowing what that system call does internally.
The Incredible Bill Gates wrote:The obvious mathematical breakthrough would be development of an easy way to factor large prime numbers.
User avatar
Torch
Posts: 825
Joined: Wed May 28, 2008 2:50 am

Post by Torch »

AFAIK LoadExec only stores the name of the module and parameters in memory and reboots the kernel. After reboot the pspbtcnf.bin modules are executed according to the normal boot process and then finally your module. Other functions are responsible for the actual loading :/
Because if you LoadExec an invalid module it reboots first and only then errors out. (However since 5.00 OFW if you launch an unsigned EBOOT from the XMB it detects immediately and shows an error instead of rebooting and then returning back to VSH to show the error like older firmware. I wonder if this also applies from in-game for new firmware.)

The loading process I assume would be exactly the same as how the pspbtcnf.bin modules are loaded.
Your question should be what does sceKernelLoadModule do as it would be this that invokes the loading/linking etc related processes.
Post Reply