summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Prichard <rprichard@google.com>2021-01-27 17:27:31 -0800
committerRyan Prichard <rprichard@google.com>2021-01-28 15:42:37 -0800
commitc22562ce6f40ece50c4c0de4a455d6690540e844 (patch)
tree832c4594cf0b343e66e98a76a0f9ce6d33096875
parentef1478765da06fad1238d4690911a6f40faa40fb (diff)
Use exported variants of arm32/x86 builtins
For backwards compatibility (e.g. with old apps), arm32 libc.so and libm.so export some of the builtins. On 32-bit x86, libc.so also exports some of the builtins. The non-exported variant of the builtins will eventually have hidden symbols but doesn't currently because D93431 hasn't been merged into our toolchain yet. See: - https://reviews.llvm.org/D93431 - I44ec79728db92c089e2f39823c35b6f97d24c1ab in toolchain/llvm_android Bug: http://b/153025717 Test: bionic unit tests Change-Id: Ic489cb06a07ef61412502fc65a21b0cf630c11ed
-rw-r--r--libc/Android.bp9
-rw-r--r--libm/Android.bp5
2 files changed, 14 insertions, 0 deletions
diff --git a/libc/Android.bp b/libc/Android.bp
index 0ee353dd2..f49f14314 100644
--- a/libc/Android.bp
+++ b/libc/Android.bp
@@ -1668,11 +1668,14 @@ cc_library {
ldflags: ["-Wl,--hash-style=both"],
version_script: ":libc.arm.map",
+ no_libcrt: true,
shared: {
srcs: [":libc_sources_shared_arm"],
// special for arm
cflags: ["-DCRT_LEGACY_WORKAROUND"],
+ // For backwards-compatibility, some arm32 builtins are exported from libc.so.
+ static_libs: ["libclang_rt.builtins-arm-android-exported"],
},
// Arm 32 bit does not produce complete exidx unwind information
@@ -1698,6 +1701,12 @@ cc_library {
ldflags: ["-Wl,--hash-style=both"],
version_script: ":libc.x86.map",
+ no_libcrt: true,
+
+ shared: {
+ // For backwards-compatibility, some x86 builtins are exported from libc.so.
+ static_libs: ["libclang_rt.builtins-i686-android-exported"],
+ },
// Leave the symbols in the shared library so that stack unwinders can produce
// meaningful name resolution.
diff --git a/libm/Android.bp b/libm/Android.bp
index 21be51ba0..735b1cf71 100644
--- a/libm/Android.bp
+++ b/libm/Android.bp
@@ -287,6 +287,11 @@ cc_library {
pack_relocations: false,
ldflags: ["-Wl,--hash-style=both"],
version_script: ":libm.arm.map",
+ no_libcrt: true,
+ shared: {
+ // For backwards-compatibility, some arm32 builtins are exported from libm.so.
+ static_libs: ["libclang_rt.builtins-arm-android-exported"],
+ },
},
arm64: {