Android-x86
Fork
Donation

  • R/O
  • HTTP
  • SSH
  • HTTPS

bionic: Commit

bionic


Commit MetaInfo

Revisiónf489cb5e4d3f279ca4e24477d4fc002744e42ab2 (tree)
Tiempo2019-10-04 19:16:08
AutorChristopher R. Palmer <crpalmer@gmai...>
Commiterserver158

Log Message

linker: Allow text-relocs for x86 (only)

This effectively reverts

https://android.googlesource.com/platform/bionic/+/e4ad91f86a47b39612e030a162f4793cb3421d31%5E%21/#F0

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

Cambiar Resumen

Diferencia

--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -3893,6 +3893,7 @@ bool soinfo::link_image(const soinfo_list_t& global_group, const soinfo_list_t&
38933893
38943894 #if !defined(__LP64__)
38953895 if (has_text_relocations) {
3896+#if !defined(__i386__) // ffmpeg says that they require text relocations on x86
38963897 // Fail if app is targeting M or above.
38973898 int app_target_api_level = get_application_target_sdk_version();
38983899 if (app_target_api_level >= __ANDROID_API_M__) {
@@ -3901,6 +3902,7 @@ bool soinfo::link_image(const soinfo_list_t& global_group, const soinfo_list_t&
39013902 "Enforced-for-API-level-23)", get_realpath());
39023903 return false;
39033904 }
3905+#endif
39043906 // Make segments writable to allow text relocations to work properly. We will later call
39053907 // phdr_table_protect_segments() after all of them are applied.
39063908 DL_WARN_documented_change(__ANDROID_API_M__,
Show on old repository browser