frosted icon indicating copy to clipboard operation
frosted copied to clipboard

Implement dlclose(), dlerror(), dlopen(), and dlsym()

Open danielinux opened this issue 8 years ago • 2 comments

Straight from the wishlist. http://linux.die.net/man/3/dlopen

@maximevince please provide some starting pointers from your deep knowledge of the obscurities (elf2flt, bflt, ...)!

danielinux avatar May 19 '16 19:05 danielinux

Hey @maximevince are you working on this?

Unfortunately I've no in-depth experience in dynamic loading but if you guide me, I can help you implementing this. What file format have you choose for dynamic libraries?

sferrini avatar Oct 06 '16 17:10 sferrini

The format we use for execution in place is bFLT. For the libraries, it'd be nice if we could execute code in place from flash as well, so the objects can be placed somewhat in xipfs, preserving the symbol addresses. LibC should act accordingly, and provide those addresses when the symbol is requested via dlsym().

I think that a harder part is making (part of) libc dynamic, as we need to identify the symbols used by all the apps in the Xipfs, and discard the rest; which obviously can't be done automatically by the linker at this time.

danielinux avatar Oct 06 '16 18:10 danielinux