Hey Bram, You're correct. Currently dlsym only supports function symbols, not data symbols.
I'd looked into this a while back and it didn't seem there was much work left to actually support data symbols, it's just not been done yet. - Anthony On Mon, Jan 13, 2014 at 6:22 PM, Bram Stolk <[email protected]> wrote: > I managed to get dlopen() working with the help of: > > DLOPEN_SUPPORT > MAIN_MODULE > SIDE_MODULE > LINKABLE > > However, my subsequent dlsym() failed to find the symbol. > (Tried to lookup unknown symbol "_backupbeep_dat" in dynamic lib: > //libsounddata.so.js) > > Now, the symbols I look up are not functions, but global C data. > And they show up in the side module JS code, so it looks like they are > just there. > > I do get this when building the side module though: > root: No functions to process. Make sure you prevented LLVM from > eliminating them as dead (use EXPORTED_FUNCTIONS if necessary, see the FAQ) > But I figured I can ignore this, as I have no functions in the module, > only data. > > My question: > Is dlsym() supposed to work for both data symbols and function symbols? > (It works on linux/android, btw.) > > Thx, > > Bram > > > -- > You received this message because you are subscribed to the Google Groups > "emscripten-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/groups/opt_out. > -- You received this message because you are subscribed to the Google Groups "emscripten-discuss" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.
