summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOrion Hodson <oth@google.com>2021-04-30 17:36:35 +0100
committerOrion Hodson <oth@google.com>2021-05-05 17:24:21 +0100
commit362ce802bc270fc86cfbb113f23f175abeeea747 (patch)
tree25b6dafdcf2bb6efe4a3747a2aa313de9d887249
parent30c5f840c909f15b86cc314ba82fa8495dd53e88 (diff)
downloadnative_bridge_support-362ce802bc270fc86cfbb113f23f175abeeea747.tar.gz
Add stubs for renamed libnativehelper NDK API methodsandroid-s-beta-2android-s-beta-1
The renames will be: - AFileDescriptor_getFD to AFileDescriptor_getFd - AFileDescriptor_setFD to AFileDescriptor_setFd This CL adds the new symbols, the old symbols will be retired in a follow-up. Bug: 185256332 Test: TH (cherry picked from commit 3ae128569ed1683e570da350be75d08aa0d7a907) Merged-In: Ifc0cf49bd699e4ab19f32ffd3c5594601979c8ea Change-Id: Ie5c1bd35bc4fee90eb769de72c307f636564a180
-rw-r--r--libnativehelper/stubs_arm.cc4
-rw-r--r--libnativehelper/stubs_arm64.cc4
2 files changed, 8 insertions, 0 deletions
diff --git a/libnativehelper/stubs_arm.cc b/libnativehelper/stubs_arm.cc
index 4a9c073..1281ff3 100644
--- a/libnativehelper/stubs_arm.cc
+++ b/libnativehelper/stubs_arm.cc
@@ -19,7 +19,9 @@
DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_create);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_getFD);
+DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_getFd);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_setFD);
+DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_setFd);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(DlCloseLibrary);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(DlGetError);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(DlGetSymbol);
@@ -70,7 +72,9 @@ DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniUninitializeConstants);
static void __attribute__((constructor(0))) init_stub_library() {
INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_create);
INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_getFD);
+ INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_getFd);
INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_setFD);
+ INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_setFd);
INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", DlCloseLibrary);
INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", DlGetError);
INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", DlGetSymbol);
diff --git a/libnativehelper/stubs_arm64.cc b/libnativehelper/stubs_arm64.cc
index 4a9c073..1281ff3 100644
--- a/libnativehelper/stubs_arm64.cc
+++ b/libnativehelper/stubs_arm64.cc
@@ -19,7 +19,9 @@
DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_create);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_getFD);
+DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_getFd);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_setFD);
+DEFINE_INTERCEPTABLE_STUB_FUNCTION(AFileDescriptor_setFd);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(DlCloseLibrary);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(DlGetError);
DEFINE_INTERCEPTABLE_STUB_FUNCTION(DlGetSymbol);
@@ -70,7 +72,9 @@ DEFINE_INTERCEPTABLE_STUB_FUNCTION(jniUninitializeConstants);
static void __attribute__((constructor(0))) init_stub_library() {
INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_create);
INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_getFD);
+ INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_getFd);
INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_setFD);
+ INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", AFileDescriptor_setFd);
INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", DlCloseLibrary);
INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", DlGetError);
INIT_INTERCEPTABLE_STUB_FUNCTION("libnativehelper.so", DlGetSymbol);