summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordimitry <dimitry@google.com>2021-12-09 20:02:06 +0000
committerAutomerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>2021-12-09 20:02:06 +0000
commit13fd1b3cb67f819a4a84f110089526c1603ec5ae (patch)
treec73d8b73c6259ad878930804bee85dc36cfb4591
parent5ea9d31156c02be80de10bf5cf29512f23d0dc8a (diff)
parent8fb43d316830a0b3496ed6bf880fa3acdd815a95 (diff)
downloadnative_bridge_support-13fd1b3cb67f819a4a84f110089526c1603ec5ae.tar.gz
Proxy clock_gettime and co to host libc am: b97e59e8b2 am: 8fb43d3168
Original change: https://googleplex-android-review.googlesource.com/c/platform/frameworks/libs/native_bridge_support/+/16432416 Change-Id: Ie6b5bb0ed77c9c33803eaedea109f0f7dda17187
-rw-r--r--libc/stubs_arm64.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/libc/stubs_arm64.cpp b/libc/stubs_arm64.cpp
index 8e15822..98c9157 100644
--- a/libc/stubs_arm64.cpp
+++ b/libc/stubs_arm64.cpp
@@ -43,12 +43,15 @@ DEFINE_INTERCEPTABLE_STUB_FUNCTION(android_getaddrinfofornet);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(android_getaddrinfofornetcontext);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(android_mallopt);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(android_set_abort_message);
+DEFINE_INTERCEPTABLE_STUB_FUNCTION(clock_getres);
+DEFINE_INTERCEPTABLE_STUB_FUNCTION(clock_gettime);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(freeaddrinfo);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(gai_strerror);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(getaddrinfo);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(gethostbyaddr);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(gethostbyname);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(getnameinfo);
+DEFINE_INTERCEPTABLE_STUB_FUNCTION(gettimeofday);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(longjmp);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(native_bridge___cxa_thread_atexit_impl);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(native_bridge_aligned_alloc);
@@ -105,6 +108,7 @@ DEFINE_INTERCEPTABLE_STUB_FUNCTION(pthread_sigqueue);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(setjmp);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(siglongjmp);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(sigsetjmp);
+DEFINE_INTERCEPTABLE_STUB_FUNCTION(time);
DEFINE_INTERCEPTABLE_STUB_VARIABLE(environ);
static void __attribute__((constructor(0))) init_stub_library() {
@@ -134,12 +138,15 @@ static void __attribute__((constructor(0))) init_stub_library() {
INIT_INTERCEPTABLE_STUB_FUNCTION("libc.so", android_getaddrinfofornetcontext);
INIT_INTERCEPTABLE_STUB_FUNCTION("libc.so", android_mallopt);
INIT_INTERCEPTABLE_STUB_FUNCTION("libc.so", android_set_abort_message);
+ INIT_INTERCEPTABLE_STUB_FUNCTION("libc.so", clock_getres);
+ INIT_INTERCEPTABLE_STUB_FUNCTION("libc.so", clock_gettime);
INIT_INTERCEPTABLE_STUB_FUNCTION("libc.so", freeaddrinfo);
INIT_INTERCEPTABLE_STUB_FUNCTION("libc.so", gai_strerror);
INIT_INTERCEPTABLE_STUB_FUNCTION("libc.so", getaddrinfo);
INIT_INTERCEPTABLE_STUB_FUNCTION("libc.so", gethostbyaddr);
INIT_INTERCEPTABLE_STUB_FUNCTION("libc.so", gethostbyname);
INIT_INTERCEPTABLE_STUB_FUNCTION("libc.so", getnameinfo);
+ INIT_INTERCEPTABLE_STUB_FUNCTION("libc.so", gettimeofday);
INIT_INTERCEPTABLE_STUB_FUNCTION("libc.so", longjmp);
INIT_INTERCEPTABLE_STUB_FUNCTION("libc.so", native_bridge___cxa_thread_atexit_impl);
INIT_INTERCEPTABLE_STUB_FUNCTION("libc.so", native_bridge_aligned_alloc);
@@ -196,6 +203,7 @@ static void __attribute__((constructor(0))) init_stub_library() {
INIT_INTERCEPTABLE_STUB_FUNCTION("libc.so", setjmp);
INIT_INTERCEPTABLE_STUB_FUNCTION("libc.so", siglongjmp);
INIT_INTERCEPTABLE_STUB_FUNCTION("libc.so", sigsetjmp);
+ INIT_INTERCEPTABLE_STUB_FUNCTION("libc.so", time);
INIT_INTERCEPTABLE_STUB_VARIABLE("libc.so", environ);
}
// clang-format on