[core] No more PIE
This commit is contained in:
parent
0109da15d8
commit
8ed46a0c18
|
|
@ -97,8 +97,8 @@ android {
|
||||||
"-fno-rtti", "-fno-exceptions",
|
"-fno-rtti", "-fno-exceptions",
|
||||||
"-fno-stack-protector",
|
"-fno-stack-protector",
|
||||||
"-fomit-frame-pointer",
|
"-fomit-frame-pointer",
|
||||||
"-fpie", "-fPIC",
|
|
||||||
"-Wno-builtin-macro-redefined",
|
"-Wno-builtin-macro-redefined",
|
||||||
|
"-Wl,--exclude-libs,ALL",
|
||||||
"-D__FILE__=__FILE_NAME__",
|
"-D__FILE__=__FILE_NAME__",
|
||||||
"-DRIRU_MODULE",
|
"-DRIRU_MODULE",
|
||||||
"-DRIRU_MODULE_API_VERSION=$moduleMaxRiruApiVersion",
|
"-DRIRU_MODULE_API_VERSION=$moduleMaxRiruApiVersion",
|
||||||
|
|
@ -298,26 +298,22 @@ afterEvaluate {
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
copy {
|
copy {
|
||||||
include("lspd")
|
include("liblspd.so")
|
||||||
rename("lspd", "liblspd.so")
|
|
||||||
from("$libPathRelease/armeabi-v7a")
|
from("$libPathRelease/armeabi-v7a")
|
||||||
into("$zipPathMagiskReleasePath/riru/lib")
|
into("$zipPathMagiskReleasePath/riru/lib")
|
||||||
}
|
}
|
||||||
copy {
|
copy {
|
||||||
include("lspd")
|
include("liblspd.so")
|
||||||
rename("lspd", "liblspd.so")
|
|
||||||
from("$libPathRelease/arm64-v8a")
|
from("$libPathRelease/arm64-v8a")
|
||||||
into("$zipPathMagiskReleasePath/riru/lib64")
|
into("$zipPathMagiskReleasePath/riru/lib64")
|
||||||
}
|
}
|
||||||
copy {
|
copy {
|
||||||
include("lspd")
|
include("liblspd.so")
|
||||||
rename("lspd", "liblspd.so")
|
|
||||||
from("$libPathRelease/x86")
|
from("$libPathRelease/x86")
|
||||||
into("$zipPathMagiskReleasePath/riru_x86/lib")
|
into("$zipPathMagiskReleasePath/riru_x86/lib")
|
||||||
}
|
}
|
||||||
copy {
|
copy {
|
||||||
include("lspd")
|
include("liblspd.so")
|
||||||
rename("lspd", "liblspd.so")
|
|
||||||
from("$libPathRelease/x86_64")
|
from("$libPathRelease/x86_64")
|
||||||
into("$zipPathMagiskReleasePath/riru_x86/lib64")
|
into("$zipPathMagiskReleasePath/riru_x86/lib64")
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
{
|
|
||||||
init;
|
|
||||||
};
|
|
||||||
|
|
@ -26,14 +26,11 @@ aux_source_directory(src SRC_LIST)
|
||||||
aux_source_directory(src/jni SRC_JNI_LIST)
|
aux_source_directory(src/jni SRC_JNI_LIST)
|
||||||
include_directories(include src)
|
include_directories(include src)
|
||||||
|
|
||||||
add_executable(lspd ${SRC_LIST} ${SRC_JNI_LIST} ${CMAKE_CURRENT_BINARY_DIR}/src/config.cpp)
|
add_library(lspd SHARED ${SRC_LIST} ${SRC_JNI_LIST} ${CMAKE_CURRENT_BINARY_DIR}/src/config.cpp)
|
||||||
|
|
||||||
SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,--dynamic-list=${CMAKE_SOURCE_DIR}/dynamic_list")
|
|
||||||
|
|
||||||
find_package(riru REQUIRED CONFIG)
|
find_package(riru REQUIRED CONFIG)
|
||||||
find_library(log-lib log)
|
find_library(log-lib log)
|
||||||
target_link_libraries(lspd yahfa riru::riru android dobby dex_builder libcxx ${log-lib})
|
target_link_libraries(lspd yahfa riru::riru android dobby dex_builder libcxx ${log-lib})
|
||||||
|
|
||||||
add_custom_command(TARGET lspd POST_BUILD
|
add_custom_command(TARGET lspd POST_BUILD
|
||||||
COMMAND ${CMAKE_STRIP} --remove-section=.preinit_array --remove-section=.comment
|
COMMAND ${CMAKE_STRIP} --remove-section=.comment -g "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/liblspd.so")
|
||||||
-g "${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/lspd")
|
|
||||||
|
|
|
||||||
|
|
@ -126,6 +126,3 @@ RIRU_EXPORT RiruVersionedModuleInfo *init(Riru *riru) {
|
||||||
lspd::allowUnload = riru->allowUnload;
|
lspd::allowUnload = riru->allowUnload;
|
||||||
return &lspd::module;
|
return &lspd::module;
|
||||||
}
|
}
|
||||||
|
|
||||||
int main() {
|
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue