Merge "libc_header is available to any apex but only visible to certain places"
diff --git a/apex/Android.bp b/apex/Android.bp
index f62f930..f6820d1 100644
--- a/apex/Android.bp
+++ b/apex/Android.bp
@@ -28,7 +28,10 @@
     ],
     multilib: {
         both: {
-            binaries: ["linker"],
+            binaries: [
+                "crash_dump",
+                "linker",
+            ],
         },
     },
     key: "com.android.runtime.key",
diff --git a/linker/linker_debuggerd_android.cpp b/linker/linker_debuggerd_android.cpp
index 42ea2b7..6a81673 100644
--- a/linker/linker_debuggerd_android.cpp
+++ b/linker/linker_debuggerd_android.cpp
@@ -33,18 +33,25 @@
 
 #include "linker_gdb_support.h"
 
+#if defined(__ANDROID_APEX__)
+static debugger_process_info get_process_info() {
+  return {
+      .abort_msg = __libc_shared_globals()->abort_msg,
+      .fdsan_table = &__libc_shared_globals()->fd_table,
+      .gwp_asan_state = __libc_shared_globals()->gwp_asan_state,
+      .gwp_asan_metadata = __libc_shared_globals()->gwp_asan_metadata,
+  };
+}
+#endif
+
 void linker_debuggerd_init() {
+  // There may be a version mismatch between the bootstrap linker and the crash_dump in the APEX,
+  // so don't pass in any process info from the bootstrap linker.
   debuggerd_callbacks_t callbacks = {
-    .get_abort_message = []() {
-      return __libc_shared_globals()->abort_msg;
-    },
-    .post_dump = &notify_gdb_of_libraries,
-    .get_gwp_asan_state = []() {
-      return __libc_shared_globals()->gwp_asan_state;
-    },
-    .get_gwp_asan_metadata = []() {
-      return __libc_shared_globals()->gwp_asan_metadata;
-    },
+#if defined(__ANDROID_APEX__)
+      .get_process_info = get_process_info,
+#endif
+      .post_dump = notify_gdb_of_libraries,
   };
   debuggerd_init(&callbacks);
 }