Support System.loadLibrary for libraries with transitive dependencies.

Also fix the FLAG_ERROR annoyance --- it's not helpful to cache failures.

Bug: 7896159
Bug: http://code.google.com/p/android/issues/detail?id=34416
Bug: http://code.google.com/p/android/issues/detail?id=22143
Change-Id: I60f235edb4ea4756e1f7ce56f7739f18e8a50789
diff --git a/linker/linker.h b/linker/linker.h
index 60c76fa..377ba15 100644
--- a/linker/linker.h
+++ b/linker/linker.h
@@ -72,7 +72,6 @@
 };
 
 #define FLAG_LINKED     0x00000001
-#define FLAG_ERROR      0x00000002
 #define FLAG_EXE        0x00000004 // The main executable
 #define FLAG_LINKER     0x00000010 // The linker itself
 
@@ -207,6 +206,7 @@
 #define DT_PREINIT_ARRAYSZ 33
 #endif
 
+void do_android_update_LD_LIBRARY_PATH(const char* ld_library_path);
 soinfo* do_dlopen(const char* name, int flags);
 int do_dlclose(soinfo* si);