OSDN Git Service

Not all shared libraries have a JNI_OnLoad.
authorElliott Hughes <enh@google.com>
Sat, 3 Aug 2013 00:41:25 +0000 (17:41 -0700)
committerElliott Hughes <enh@google.com>
Sat, 3 Aug 2013 00:41:25 +0000 (17:41 -0700)
Change-Id: Iace5d33cbeafbf8b840bebb4bb709e32053f142d

vm/Native.cpp

index 02fb46d..a12c4e0 100644 (file)
@@ -417,8 +417,8 @@ bool dvmLoadNativeCode(const char* pathName, Object* classLoader,
 
         vonLoad = dlsym(handle, "JNI_OnLoad");
         if (vonLoad == NULL) {
-            ALOGD("No JNI_OnLoad found in %s %p, skipping init",
-                pathName, classLoader);
+            ALOGD("No JNI_OnLoad found in %s %p, skipping init", pathName, classLoader);
+            result = true;
         } else {
             /*
              * Call JNI_OnLoad.  We have to override the current class