diff --git a/CMakeLists.txt b/CMakeLists.txt index 541b18db60..0cd3d47eef 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1129,6 +1129,9 @@ if(ANDROID AND NOT LIBRETRO) # what openxr_loader was previously only being linked into. target_link_libraries(ppsspp_jni openxr_loader) endif() + # Calls between our own functions bind directly, rather than through the PLT (which cost a few + # percent of the emulator thread on a Galaxy S8). Nothing outside needs to interpose them. + target_link_options(ppsspp_jni PRIVATE "-Wl,-Bsymbolic-functions") if(ARM64) # Support 16kb page size on Android target_link_options(ppsspp_jni PRIVATE "-Wl,-z,max-page-size=16384") diff --git a/android/jni/Android.mk b/android/jni/Android.mk index 0f7aaa319c..b0901e8450 100644 --- a/android/jni/Android.mk +++ b/android/jni/Android.mk @@ -1140,6 +1140,9 @@ LOCAL_SRC_FILES := \ $(SRC)/UI/CustomButtonMappingScreen.cpp \ $(SRC)/UI/RetroAchievementScreens.cpp +# Calls between our own functions bind directly, not through the PLT (see CMakeLists.txt). +LOCAL_LDFLAGS += -Wl,-Bsymbolic-functions + ifneq ($(SKIPAPP),1) include $(BUILD_SHARED_LIBRARY) endif