Snap for 11192287 from 5bfb690c7705e29a6a0de08eae4911b4d224be1e to 24Q1-release

Change-Id: I9e85f8cb8d84fa20af149d5fc3edb2c3c8c4d1df
diff --git a/libunwindstack/Android.bp b/libunwindstack/Android.bp
index d2b02c6..da51339 100644
--- a/libunwindstack/Android.bp
+++ b/libunwindstack/Android.bp
@@ -202,6 +202,24 @@
         },
     },
 
+    arch: {
+        arm: {
+            version_script: "exported.map",
+        },
+        arm64: {
+            version_script: "exported.map",
+        },
+        riscv64: {
+            version_script: "exported.map",
+        },
+        x86: {
+            version_script: "exported_x86.map",
+        },
+        x86_64: {
+            version_script: "exported_x86.map",
+        },
+    },
+
     apex_available: [
         "//apex_available:platform",
         "com.android.art",
diff --git a/libunwindstack/exported.map b/libunwindstack/exported.map
new file mode 100644
index 0000000..bfd236c
--- /dev/null
+++ b/libunwindstack/exported.map
@@ -0,0 +1,7 @@
+LIBUNWINDSTACK {
+  global:
+    *unwindstack*;
+
+  local:
+    *;
+};
diff --git a/libunwindstack/exported_x86.map b/libunwindstack/exported_x86.map
new file mode 100644
index 0000000..d55b3c7
--- /dev/null
+++ b/libunwindstack/exported_x86.map
@@ -0,0 +1,8 @@
+LIBUNWINDSTACK {
+  global:
+    *unwindstack*;
+    AsmGetRegs;
+
+  local:
+    *;
+};
diff --git a/libunwindstack/include/unwindstack/RegsGetLocal.h b/libunwindstack/include/unwindstack/RegsGetLocal.h
index 4cdab9a..a04ea7b 100644
--- a/libunwindstack/include/unwindstack/RegsGetLocal.h
+++ b/libunwindstack/include/unwindstack/RegsGetLocal.h
@@ -129,6 +129,8 @@
 
 #elif defined(__i386__) || defined(__x86_64__)
 
+// Do not change this, some libraries depend on this function existing on
+// these architectures.
 extern "C" void AsmGetRegs(void* regs);
 
 #endif