dynamic loading without dlopen?

Post Reply
badda
Posts: 4
Joined: Thu Feb 28, 2019 10:26 am

dynamic loading without dlopen?

Post by badda » Thu Mar 07, 2019 2:59 pm

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 ...

WinterMute
Site Admin
Posts: 1361
Joined: Tue Aug 09, 2005 3:21 am
Location: UK
Contact:

Re: dynamic loading without dlopen?

Post by WinterMute » Sat Mar 09, 2019 1:51 am

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.
Help keep devkitPro toolchains free, Donate today

devkitPro IRC support
Personal Blog

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest