[MIPS] Support FR=0 emulation on FR=1 64-bit FP registers
Enables running of older MIPS NDK-built apps on mips64r6.
Works with kernel supporting FRE emulation, and old kernels.
Change-Id: If5e392ed89e9910cd1ccd30e0fd5c4a5acea2c7d
diff --git a/linker/linker.cpp b/linker/linker.cpp
index 2468829..1f00771 100644
--- a/linker/linker.cpp
+++ b/linker/linker.cpp
@@ -2875,6 +2875,12 @@
}
}
+#if defined(__mips__) && !defined(__LP64__)
+ if (!mips_check_and_adjust_fp_modes()) {
+ return false;
+ }
+#endif
+
DEBUG("si->base = %p, si->strtab = %p, si->symtab = %p",
reinterpret_cast<void*>(base), strtab_, symtab_);