summaryrefslogtreecommitdiff
path: root/libm
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2018-08-21 11:49:25 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2018-08-21 14:51:59 -0300
commitab42e6fcbf412be2319d86a8cfdf750233464f1e (patch)
treebe10b0e9c1ad0be0ba5d36d32bc66455939ff836 /libm
parentbd58729085435057dc8611eeafad6f76cf72f543 (diff)
Use --Bsymbolic-functions on libm
This option removes mostly of the PLT calls for internal symbol, they are routed to internal entrypoint instead. It should be safe for libm, since symbol interposing is not supported. For arm64 the remaining PLTs are __cxa_finalize, ldexp, __stack_chk_fail, isnanf, memset, and isxdigit. All of them are expected (clang (r339432) does not have optimization for isnan/isinf inline expansion and these symbols are defined on libc.so). Test: Builds, ran unit tests on arm and x86. Change-Id: I1eb1a9f2b30f21788d9ad8639b4a0a15f6d0566a
Diffstat (limited to 'libm')
-rw-r--r--libm/Android.bp4
1 files changed, 4 insertions, 0 deletions
diff --git a/libm/Android.bp b/libm/Android.bp
index 3c375c7b0..3b88fa3a8 100644
--- a/libm/Android.bp
+++ b/libm/Android.bp
@@ -504,6 +504,10 @@ cc_library {
"-Wno-unused-variable",
],
+ ldflags: [
+ "-Wl,--Bsymbolic-functions",
+ ],
+
include_dirs: ["bionic/libc"],
system_shared_libs: ["libc"],