bionic
Revision | a02c855c4598ec65d2848911c1bc190becbb2c5a (tree) |
---|---|
Zeit | 2019-12-17 12:55:22 |
Autor | Christopher R. Palmer <crpalmer@gmai...> |
Commiter | Chih-Wei Huang |
linker: Allow text-relocs for x86 (only)
This effectively reverts
for x86 platforms. Unfortunately, this seems like it is required
if we are going to support ffmpeg. The ffmpeg team decreed that they
require text relocations for x86 (only) and that they would not
fix the fact that android 6.0 makes ffmpeg unusable on x86:
https://trac.ffmpeg.org/ticket/4928
Change-Id: I68397f4d62f4f6acd8e0d41b7ecdc115969b890a
@@ -3900,6 +3900,7 @@ bool soinfo::link_image(const soinfo_list_t& global_group, const soinfo_list_t& | ||
3900 | 3900 | |
3901 | 3901 | #if !defined(__LP64__) |
3902 | 3902 | if (has_text_relocations) { |
3903 | +#if !defined(__i386__) // ffmpeg says that they require text relocations on x86 | |
3903 | 3904 | // Fail if app is targeting M or above. |
3904 | 3905 | int app_target_api_level = get_application_target_sdk_version(); |
3905 | 3906 | if (app_target_api_level >= __ANDROID_API_M__) { |
@@ -3908,6 +3909,7 @@ bool soinfo::link_image(const soinfo_list_t& global_group, const soinfo_list_t& | ||
3908 | 3909 | "Enforced-for-API-level-23)", get_realpath()); |
3909 | 3910 | return false; |
3910 | 3911 | } |
3912 | +#endif | |
3911 | 3913 | // Make segments writable to allow text relocations to work properly. We will later call |
3912 | 3914 | // phdr_table_protect_segments() after all of them are applied. |
3913 | 3915 | DL_WARN_documented_change(__ANDROID_API_M__, |