Remove ExtractCodeAndPrelink and switch Portable to MCLinker

Change-Id: Ia2459c7da6b79e0a1c0f1148c6e28ad9cbbe27a2
diff --git a/src/common_test.h b/src/common_test.h
index 0d3795e..0167424 100644
--- a/src/common_test.h
+++ b/src/common_test.h
@@ -246,7 +246,7 @@
                                                       &compiled_method->GetVmapTable()[0],
                                                       NULL,
                                                       method_invoke_stub);
-      oat_method.LinkMethodPointers(method);
+      oat_method.LinkMethod(method);
     } else {
       MakeExecutable(runtime_->GetAbstractMethodErrorStubArray());
       const void* method_code = runtime_->GetAbstractMethodErrorStubArray()->GetData();
@@ -259,7 +259,7 @@
                                                       NULL,
                                                       NULL,
                                                       method_invoke_stub);
-      oat_method.LinkMethodPointers(method);
+      oat_method.LinkMethod(method);
     }
   }
 
@@ -434,12 +434,16 @@
   }
 
   std::string GetLibCoreDexFileName() {
+    return GetDexFileName("core");
+  }
+
+  std::string GetDexFileName(const std::string& jar_prefix) {
     if (IsHost()) {
       const char* host_dir = getenv("ANDROID_HOST_OUT");
       CHECK(host_dir != NULL);
-      return StringPrintf("%s/framework/core-hostdex.jar", host_dir);
+      return StringPrintf("%s/framework/%s-hostdex.jar", host_dir, jar_prefix.c_str());
     }
-    return StringPrintf("%s/framework/core.jar", GetAndroidRoot());
+    return StringPrintf("%s/framework/%s.jar", GetAndroidRoot(), jar_prefix.c_str());
   }
 
   const DexFile* OpenTestDexFile(const char* name) {
@@ -585,6 +589,16 @@
   DISALLOW_COPY_AND_ASSIGN(CheckJniAbortCatcher);
 };
 
+// TODO: These tests were disabled for portable when we went to having
+// MCLinker link LLVM ELF output because we no longer just have code
+// blobs in memory. We'll need to dlopen to load and relocate
+// temporary output to resurrect these tests.
+#if defined(ART_USE_PORTABLE_COMPILER)
+#define TEST_DISABLED_FOR_PORTABLE() printf("WARNING: TEST DISABLED FOR PORTABLE\n"); return
+#else
+#define TEST_DISABLED_FOR_PORTABLE()
+#endif
+
 }  // namespace art
 
 namespace std {