Commit 5f5a0648 by Anton D. Kachalov Committed by Ben Clayton

Add missed symbol __aeabi_idivmod for Android.

SwiftShader segfaults when trying to resolve missed symbol. The symbol is requested at least on ARM32 (armv7l).. Change-Id: I96dd157afc1832ef39daaf46d818c8033820d86b Bug: b/149229646 Reviewed-on: https://swiftshader-review.googlesource.com/c/SwiftShader/+/41049Reviewed-by: 's avatarBen Clayton <bclayton@google.com> Reviewed-by: 's avatarAlexis Hétu <sugoi@google.com> Kokoro-Presubmit: kokoro <noreply+kokoro@google.com> Kokoro-Presubmit: Lingfeng Yang <lfy@google.com> Tested-by: 's avatarBen Clayton <bclayton@google.com>
parent 196d8177
......@@ -79,6 +79,10 @@ extern "C" void _chkstk();
# include <sanitizer/msan_interface.h>
#endif
#ifdef __ANDROID__
extern "C" signed __aeabi_idivmod();
#endif
namespace {
// Cache provides a simple, thread-safe key-value store.
......@@ -540,6 +544,7 @@ void *resolveExternalSymbol(const char *name)
#endif
#ifdef __ANDROID__
functions.emplace("aeabi_idivmod", reinterpret_cast<void *>(__aeabi_idivmod));
functions.emplace("aeabi_unwind_cpp_pr0", reinterpret_cast<void *>(F::neverCalled));
functions.emplace("sync_synchronize", reinterpret_cast<void *>(F::sync_synchronize));
functions.emplace("sync_fetch_and_add_4", reinterpret_cast<void *>(F::sync_fetch_and_add_4));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment