MCPcopy Create free account
hub / github.com/ReadyTalk/avian / loadLibrary

Function loadLibrary

src/classpath-android.cpp:54–73  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

52}
53
54void JNICALL loadLibrary(Thread* t, object, uintptr_t* arguments)
55{
56 GcString* name = cast<GcString>(t, reinterpret_cast<object>(arguments[1]));
57
58 Thread::LibraryLoadStack stack(
59 t, cast<GcClassLoader>(t, reinterpret_cast<object>(arguments[2])));
60
61 unsigned length = name->length(t);
62 THREAD_RUNTIME_ARRAY(t, char, n, length + 1);
63 stringChars(t, name, RUNTIME_ARRAY_BODY(n));
64
65 /* org_conscrypt_NativeCrypto.o is linked statically, and in Avian build
66 the package is named org.conscrypt.NativeCrypto. When Android code sees
67 that name it thinks the library isn't linked as a part of Android, so it
68 tries to load in dynamically, but there's actually no need to, so we
69 just ignore this request. */
70 if (strcmp(RUNTIME_ARRAY_BODY(n), "conscrypt_jni") != 0) {
71 loadLibrary(t, "", RUNTIME_ARRAY_BODY(n), true, true);
72 }
73}
74
75void JNICALL gc(Thread* t, object, uintptr_t*)
76{

Callers 6

resolveNativeMethod · 0.70
bootMethod · 0.70
loadLibraryMethod · 0.70
jvmLoadLibraryFunction · 0.70

Calls 3

strcmpFunction · 0.85
stringCharsFunction · 0.70
lengthMethod · 0.65

Tested by

no test coverage detected