dynamic loading without dlopen?
dynamic loading without dlopen?
I would like to dynamically load executable code at runtime but I understand there is no dlopen() in devkitARM. Is there another way to do this? I've seen this done for example in NTR CFW, which has a plugin system that loads plugin-files dynamically depending on the current title... though I cannot figure out how NTR actually does that ...
-
- Site Admin
- Posts: 1986
- Joined: Tue Aug 09, 2005 3:21 am
- Location: UK
- Contact:
Re: dynamic loading without dlopen?
The short answer to this is you don't and you shouldn't dynamically load executable code at runtime in this environment. Everything is statically compiled so there's no easy way to make it work and you just end up with brittle code that tends to fail when the tools are updated.
A plugin architecture is much easier to maintain and use if it's based on an interpreted scripting language rather than attempting to load compiled code at runtime. It kind of depends on what you want to do but you should bear in mind that despite our efforts to make a lot of linux based code compile OOB with devkitARM/libctru we're not running on a full blown OS and some things really won't work that well in this environment.
A plugin architecture is much easier to maintain and use if it's based on an interpreted scripting language rather than attempting to load compiled code at runtime. It kind of depends on what you want to do but you should bear in mind that despite our efforts to make a lot of linux based code compile OOB with devkitARM/libctru we're not running on a full blown OS and some things really won't work that well in this environment.
Who is online
Users browsing this forum: No registered users and 0 guests