Remove linkloader from frameworks/rs.

Bug: 18322681

Now that we have switched completely to the new shared library object
loading path, we can safely remove the legacy linkloader path.

In frameworks/rs, this removes the actual linkloader code, as well as
all helper calls into linkloader. This change also coalesces code paths
between the support library version of RS and the native version of RS,
since they both now depend on a similar shared library loader. A missing
call to dlclose() on Script teardown is also added on the native library
path.

Change-Id: Ie5cc152d93f5e75383f7c21a4523579cfae8823f
diff --git a/cpu_ref/rsCpuScript.h b/cpu_ref/rsCpuScript.h
index 324ee14..7f7750f 100644
--- a/cpu_ref/rsCpuScript.h
+++ b/cpu_ref/rsCpuScript.h
@@ -21,8 +21,6 @@
 #include <rsRuntime.h>
 
 #ifndef RS_COMPATIBILITY_LIB
-#include <bcc/ExecutionEngine/CompilerRTSymbolResolver.h>
-#include <bcc/ExecutionEngine/SymbolResolverProxy.h>
 #include <vector>
 #include <utility>
 #endif
@@ -32,7 +30,6 @@
 namespace bcc {
     class BCCContext;
     class RSCompilerDriver;
-    class RSExecutable;
 }
 
 namespace bcinfo {
@@ -110,11 +107,6 @@
     virtual Allocation * getAllocationForPointer(const void *ptr) const;
     bool storeRSInfoFromSO();
 
-#ifndef RS_COMPATIBILITY_LIB
-    bool storeRSInfoFromObj(bcinfo::MetadataExtractor &bitcodeMetadata);
-    virtual  void * getRSExecutable() { return mExecutable; }
-#endif
-
 protected:
     RsdCpuReferenceImpl *mCtx;
     const Script *mScript;
@@ -124,27 +116,10 @@
     // Returns the path to the core library we'll use.
     const char* findCoreLib(const bcinfo::MetadataExtractor& bitCodeMetaData, const char* bitcode,
                             size_t bitcodeSize);
-    RootFunc_t mRoot;
-    RootFunc_t mRootExpand;
-    InvokeFunc_t mInit;
-    InvokeFunc_t mFreeChildren;
-
-    InvokeFunc_t *mInvokeFunctions;
-    ForEachFunc_t *mForEachFunctions;
-    void **mFieldAddress;
-    bool *mFieldIsObject;
-    uint32_t *mForEachSignatures;
-    size_t mExportedVariableCount;
-    size_t mExportedFunctionCount;
-
-    std::vector<std::pair<const char *, uint32_t> > mExportedForEachFuncList;
 
     bcc::RSCompilerDriver *mCompilerDriver;
-    bcc::CompilerRTSymbolResolver mCompilerRuntime;
-    bcc::LookupFunctionSymbolResolver<void *> mRSRuntime;
-    bcc::SymbolResolverProxy mResolver;
-    bcc::RSExecutable *mExecutable;
-#else
+#endif
+
     RootFunc_t mRoot;
     RootFunc_t mRootExpand;
     InvokeFunc_t mInit;
@@ -156,12 +131,8 @@
     bool *mFieldIsObject;
     uint32_t *mForEachSignatures;
 
-    // for populate script
-    //int mVersionMajor;
-    //int mVersionMinor;
     size_t mExportedVariableCount;
     size_t mExportedFunctionCount;
-#endif
 
     Allocation **mBoundAllocs;
     void * mIntrinsicData;