summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Ferris <cferris@google.com>2023-12-05 21:29:45 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2023-12-05 21:29:45 +0000
commit5688a6be308b6ca7e12cd8d67eb0582c6f090c62 (patch)
tree4bc3d2b1c3022ffcd81479fb6fd2426dc9d12c44
parent07dd2e79f89990c759aebb8a84b08e2772913ded (diff)
parent644f5add51910ad78ce9046942a72400258fe047 (diff)
downloadunwinding-5688a6be308b6ca7e12cd8d67eb0582c6f090c62.tar.gz
Only export unwindstack:: functions. am: 82dec5e808 am: f1f5386664 am: 644f5add51
Original change: https://android-review.googlesource.com/c/platform/system/unwinding/+/2858685 Change-Id: Ia95270229362c89f074623da8c06caf6bbabfb42 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
-rw-r--r--libunwindstack/Android.bp2
-rw-r--r--libunwindstack/AsmGetRegsX86.S3
-rw-r--r--libunwindstack/AsmGetRegsX86_64.S3
-rw-r--r--libunwindstack/exported.map7
-rw-r--r--libunwindstack/include/unwindstack/RegsGetLocal.h2
5 files changed, 16 insertions, 1 deletions
diff --git a/libunwindstack/Android.bp b/libunwindstack/Android.bp
index d2b02c6..b1a3480 100644
--- a/libunwindstack/Android.bp
+++ b/libunwindstack/Android.bp
@@ -196,9 +196,11 @@ cc_library {
},
android: {
runtime_libs: ["libdexfile"], // libdexfile_support dependency
+ version_script: "exported.map",
},
linux: {
runtime_libs: ["libdexfile"], // libdexfile_support dependency
+ version_script: "exported.map",
},
},
diff --git a/libunwindstack/AsmGetRegsX86.S b/libunwindstack/AsmGetRegsX86.S
index 021e628..323ee26 100644
--- a/libunwindstack/AsmGetRegsX86.S
+++ b/libunwindstack/AsmGetRegsX86.S
@@ -26,6 +26,9 @@
* SUCH DAMAGE.
*/
+// Use the mangled name to make it easy to export functions.
+#define AsmGetRegs _ZN11unwindstack10AsmGetRegsEPv
+
.text
.global AsmGetRegs
.balign 16
diff --git a/libunwindstack/AsmGetRegsX86_64.S b/libunwindstack/AsmGetRegsX86_64.S
index 4cd3b6f..dc5ecad 100644
--- a/libunwindstack/AsmGetRegsX86_64.S
+++ b/libunwindstack/AsmGetRegsX86_64.S
@@ -26,6 +26,9 @@
* SUCH DAMAGE.
*/
+// Use the mangled name to make it easy to export functions.
+#define AsmGetRegs _ZN11unwindstack10AsmGetRegsEPv
+
.text
.global AsmGetRegs
.balign 16
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/include/unwindstack/RegsGetLocal.h b/libunwindstack/include/unwindstack/RegsGetLocal.h
index 4cdab9a..ac98c5f 100644
--- a/libunwindstack/include/unwindstack/RegsGetLocal.h
+++ b/libunwindstack/include/unwindstack/RegsGetLocal.h
@@ -129,7 +129,7 @@ inline __attribute__((__always_inline__)) void AsmGetRegs(void* reg_data) {
#elif defined(__i386__) || defined(__x86_64__)
-extern "C" void AsmGetRegs(void* regs);
+void AsmGetRegs(void* regs);
#endif