Avoid internal APEX stubs for libsigchain and clean up exported symbols.

Test: art/tools/buildbot-build.sh {--target,--host}
  on master-art
Test: m droid
  on AOSP master
Bug: 182563345
Bug: 183882457
Change-Id: I4f8ead7853042fec19a4aba4dd37be02ab0202b8
diff --git a/libdexfile/Android.bp b/libdexfile/Android.bp
index 8c7114e..0d01d26 100644
--- a/libdexfile/Android.bp
+++ b/libdexfile/Android.bp
@@ -240,6 +240,10 @@
     },
     apex_available: [
         "com.android.art.debug",
+        // TODO(b/183882457): This lib doesn't go into com.android.art, but
+        // apex_available lists need to be the same for internal libs to avoid
+        // stubs, and libartd depends on this.
+        "com.android.art",
     ],
     stubs: {
         // TODO(b/143978909): Rename and move this file to this directory.
diff --git a/libprofile/Android.bp b/libprofile/Android.bp
index 50f806e..2edf821 100644
--- a/libprofile/Android.bp
+++ b/libprofile/Android.bp
@@ -175,6 +175,10 @@
     export_shared_lib_headers: ["libbase"],
     apex_available: [
         "com.android.art.debug",
+        // TODO(b/183882457): This lib doesn't go into com.android.art, but
+        // apex_available lists need to be the same for internal libs to avoid
+        // stubs, and libartd depends on this.
+        "com.android.art",
     ],
 }
 
diff --git a/runtime/Android.bp b/runtime/Android.bp
index ca2fb36..f8d733d 100644
--- a/runtime/Android.bp
+++ b/runtime/Android.bp
@@ -586,6 +586,10 @@
     ],
     apex_available: [
         "com.android.art.debug",
+        // TODO(b/183882457): This lib doesn't go into com.android.art, but
+        // apex_available lists need to be the same for internal libs to avoid
+        // stubs, and this depends on libsigchain.
+        "com.android.art",
     ],
 }
 
diff --git a/sigchainlib/libsigchain.map.txt b/sigchainlib/libsigchain.map.txt
index 148c4ed..02c20c7 100644
--- a/sigchainlib/libsigchain.map.txt
+++ b/sigchainlib/libsigchain.map.txt
@@ -16,10 +16,10 @@
 
 LIBSIGCHAIN_1 {
   global:
-    EnsureFrontOfChain;
-    AddSpecialSignalHandlerFn;
-    RemoveSpecialSignalHandlerFn;
-    SkipAddSignalHandler;
+    # Export no symbols - the only external entry points are libc overrides.
+    # Since this section cannot be empty for APEX stubs generation we provide a
+    # phony entry.
+    LibsigchainNonexistentFunction;
   local:
     *;
 };