diff options
author | Elliott Hughes <enh@google.com> | 2019-03-26 08:52:07 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2019-03-26 08:52:07 -0700 |
commit | 3770d9326345dcb3d8c93bddfa0c97256a59c251 (patch) | |
tree | 75a9d37997ce22132ee35d7bde87f7e01d032b74 /android-changes-for-ndk-developers.md | |
parent | b1ddbfdcdcbd583ae36ba31ad65ca4cb62e0733e (diff) |
docs: mention the fact that bionic now uses ifuncs.
Bug: http://b/123296740
Test: N/A
Change-Id: I2cdc575270ebf32fd8ac1de21182150f5222cf9f
Diffstat (limited to 'android-changes-for-ndk-developers.md')
-rw-r--r-- | android-changes-for-ndk-developers.md | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/android-changes-for-ndk-developers.md b/android-changes-for-ndk-developers.md index 1630db8e4..4c13bec7e 100644 --- a/android-changes-for-ndk-developers.md +++ b/android-changes-for-ndk-developers.md @@ -417,3 +417,17 @@ are possible workarounds. | No workaround | Works for static STL | Broken | Works | | `-Wl,-z,nodelete` | Works for static STL | Works | Works | | No `dlclose` | Works | Works | Works | + +## Use of IFUNC in libc (True for all API levels on devices running Q) + +Starting with Android Q (API level 29), libc uses +[IFUNC](https://sourceware.org/glibc/wiki/GNU_IFUNC) functionality in +the dynamic linker to choose optimized assembler routines at run time +rather than at build time. This lets us use the same `libc.so` on all +devices, and is similar to what other OSes already did. Because the zygote +uses the C library, this decision is made long before we know what API +level an app targets, so all code sees the new IFUNC-using C library. +Most apps should be unaffected by this change, but apps that hook or try to +detect hooking of C library functions might need to fix their code to cope +with IFUNC relocations. The affected functions are from `<string.h>`, but +may expand to include more functions (and more libraries) in future. |