mirror of
https://github.com/topjohnwu/Magisk.git
synced 2026-01-07 02:04:52 -08:00
Wrap rename and renameat
This commit is contained in:
@@ -28,12 +28,10 @@ include $(BUILD_STATIC_LIBRARY)
|
||||
|
||||
include $(CLEAR_VARS)
|
||||
LOCAL_MODULE := libcompat
|
||||
# Add "hacky" libc.a missing symbols back
|
||||
# All symbols in this library are weak, so a vanilla NDK should still link properly
|
||||
LOCAL_SRC_FILES := compat/compat.cpp
|
||||
# Fix static variables' ctor/dtor when using LTO
|
||||
# See: https://github.com/android/ndk/issues/1461
|
||||
LOCAL_EXPORT_LDFLAGS := -static -T src/lto_fix.lds
|
||||
LOCAL_EXPORT_LDFLAGS := -static -T src/lto_fix.lds -Wl,--wrap=rename -Wl,--wrap=renameat
|
||||
# For some reason, using the hacky libc.a with x86 will trigger stack protection violation
|
||||
# when mixing Rust and C++ code. Disable stack protector to bypass this issue.
|
||||
ifeq ($(TARGET_ARCH), x86)
|
||||
|
||||
Reference in New Issue
Block a user