Merge changes from topic "liblog" into rvc-dev

* changes:
  Statically link libdl.a to linker
  Delete definitions of __aeabi_unwind_cpp_pr0.
diff --git a/libdl/Android.bp b/libdl/Android.bp
index 59f1937..a94b7f5 100644
--- a/libdl/Android.bp
+++ b/libdl/Android.bp
@@ -29,6 +29,11 @@
     sanitize: {
         never: true,
     },
+
+    apex_available: [
+        "//apex_available:platform",
+        "com.android.runtime",
+    ],
 }
 
 cc_library {
diff --git a/libdl/libdl.cpp b/libdl/libdl.cpp
index 1ee4012..a56a5ab 100644
--- a/libdl/libdl.cpp
+++ b/libdl/libdl.cpp
@@ -138,16 +138,4 @@
   return __loader_android_get_application_target_sdk_version();
 }
 
-#if defined(__arm__)
-// An arm32 unwinding table has an R_ARM_NONE relocation to
-// __aeabi_unwind_cpp_pr0. This shared library will never invoke the unwinder,
-// so it doesn't actually need the routine. Define a dummy version here,
-// because the real version calls libc functions (e.g. memcpy, abort), which
-// would create a dependency cycle with libc.so.
-__attribute__((visibility("hidden")))
-void __aeabi_unwind_cpp_pr0() {
-  __builtin_trap();
-}
-#endif
-
 } // extern "C"
diff --git a/libdl/libdl_android.cpp b/libdl/libdl_android.cpp
index 77b3bf8..47a164a 100644
--- a/libdl/libdl_android.cpp
+++ b/libdl/libdl_android.cpp
@@ -115,16 +115,4 @@
   return __loader_android_get_exported_namespace(name);
 }
 
-#if defined(__arm__)
-// An arm32 unwinding table has an R_ARM_NONE relocation to
-// __aeabi_unwind_cpp_pr0. This shared library will never invoke the unwinder,
-// so it doesn't actually need the routine. Define a dummy version here,
-// because the real version calls libc functions (e.g. memcpy, abort), which
-// would create a dependency cycle with libc.so.
-__attribute__((visibility("hidden")))
-void __aeabi_unwind_cpp_pr0() {
-  __builtin_trap();
-}
-#endif
-
 } // extern "C"
diff --git a/linker/Android.bp b/linker/Android.bp
index 4be080b..3190870 100644
--- a/linker/Android.bp
+++ b/linker/Android.bp
@@ -98,6 +98,7 @@
     static_libs: [
         "libziparchive",
         "libbase",
+        "libdl", // libbase uses dlsym
         "libz",
 
         "libasync_safe",
diff --git a/linker/ld_android.cpp b/linker/ld_android.cpp
index 152c2e2..0239c30 100644
--- a/linker/ld_android.cpp
+++ b/linker/ld_android.cpp
@@ -58,15 +58,3 @@
 __strong_alias(__loader_dl_unwind_find_exidx, __internal_linker_error);
 #endif
 __strong_alias(rtld_db_dlactivity, __internal_linker_error);
-
-#if defined(__arm__)
-// An arm32 unwinding table has an R_ARM_NONE relocation to
-// __aeabi_unwind_cpp_pr0. This shared library will never invoke the unwinder,
-// so it doesn't actually need the routine. Define a dummy version here,
-// because the real version calls libc functions (e.g. memcpy, abort), which
-// would create a dependency cycle with libc.so.
-__attribute__((visibility("hidden")))
-extern "C" void __aeabi_unwind_cpp_pr0() {
-  __builtin_trap();
-}
-#endif