Android: Link ppsspp_jni with -Bsymbolic-functions

Calls between functions in the library went through PLT stubs, since it's
built with default visibility. The stubs were about 5% of JIT compile time on
a Galaxy S8 (the IR passes call many small helpers in other files), and a few
percent of the emulator thread in general. --jit-bench: 27 -> 25 us per block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Henrik RydgårdandClaude Opus 5.5 committed 2026-11-10 19:40:09 +01:00
1 parent c3d4ad3485
commit c046b83ce9
2 files changed
+6

No files matched your search

+3
View File
@@ -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")
+3
View File
@@ -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