Fix ClassLinker::SetEntryPointsToInterpreter() for native methods

When ClassLinker tries to set the entrypoint for a native method,
OatFile::OatMethod::GetQuickCode() returns nullptr on MIPS. This is
done because art_quick_generic_jni_trampoline is treated as OatMethod
and it is trying to get its size by loading word from address just
prior start of the entrypoint (if size is 0, nullptr is returned
and there is a padding nop instruction which is encoded as 0).

With this, SetEntryPointFromQuickCompiledCode() will be called
directly, not through OatFile::OatMethod::LinkMethod().

This fixes two test failures on MIPS32 and MIPS64:
* 945-obsolete-native
* runtime_callbacks_test

Note: All tests are executed in QEMU (MIPS64R6 and MIPS32R6) and on
      ci20 board (MIPS32R2).

Test: mma test-art-target-gtest
Test: ./testrunner.py --target --optimizing

Change-Id: I936d301be2b4abaa2fede721e6d05fa14310d01d
1 file changed