k***@gmail.com
2018-09-21 07:16:43 UTC
Hi,
I have a problem when dynamically loading two libraries on Android, which
seems to be able to work on Linux. I have a situation where I have two
shared libraries, let's call them libA.so and libB.so. libA.so gets loaded
via dlopen() and uses a singleton. libA.so at some point loads libB.so via
dlopen(), which also uses the same singleton. Unfortunately, the dynamic
linker cannot merge those tho singleton symbols into one, and the result is
two singleton instances. nm -C -D shows the instance to be a weak symbol
"V" in both libraries. Is there any way to make the dynamic linker merge
those symbols?
I have a problem when dynamically loading two libraries on Android, which
seems to be able to work on Linux. I have a situation where I have two
shared libraries, let's call them libA.so and libB.so. libA.so gets loaded
via dlopen() and uses a singleton. libA.so at some point loads libB.so via
dlopen(), which also uses the same singleton. Unfortunately, the dynamic
linker cannot merge those tho singleton symbols into one, and the result is
two singleton instances. nm -C -D shows the instance to be a weak symbol
"V" in both libraries. Is there any way to make the dynamic linker merge
those symbols?
--
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/a2a39aea-97d7-4c26-bf6b-abd7813f19ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
You received this message because you are subscribed to the Google Groups "android-ndk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to android-ndk+***@googlegroups.com.
To post to this group, send email to android-***@googlegroups.com.
Visit this group at https://groups.google.com/group/android-ndk.
To view this discussion on the web visit https://groups.google.com/d/msgid/android-ndk/a2a39aea-97d7-4c26-bf6b-abd7813f19ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.