forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Late binding of module imports - module import flags

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
mrbrown



Joined: 17 Jan 2004
Posts: 1536

PostPosted: Wed May 25, 2005 3:29 pm    Post subject: Late binding of module imports - module import flags Reply with quote

Came across something interesting and don't know if anyone else has noticed this:

I was trying to see if the sceNet library was already loaded when my app is loaded from the memory stick. I used the STUB_START macro from nem's hello world source to create a dummy sceNet import and imported sceNetTerm.

When I went to run the app, it loaded, then kicked me back out to the XMB with the "The game could not be started" message, with 80000001 as the error code. I then took another look at Wipeout, and noticed it was using 0x90000 as it's module import flags for sceNet, where nem's macro uses 0x40010000. I changed it to 0x90000, and lo and behold my test app loaded and ran to completion.

So the 0x90000 flag tells the program loader to delay the binding of module imports until the module is physically loaded and started.

Another bit that's interesting is that instead of the "syscall 0x20xx" that you normally see resolved for stubs, the function I called from sceNet had "syscall 0x15" resolved. If I call this function directly nothing happens. The "syscall 0x15" must be a placeholder until the real pspnet.prx is loaded.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group