[core] Fix `failed to open [anon:linker_alloc]` (#1082)
Fix LSPosed/LSPatch#17
This commit is contained in:
parent
b49aa00df5
commit
6a2e53134f
|
|
@ -228,7 +228,7 @@ bool ElfImg::findModuleBase() {
|
||||||
|
|
||||||
|
|
||||||
while (fgets(buff, sizeof(buff), maps)) {
|
while (fgets(buff, sizeof(buff), maps)) {
|
||||||
if ((strstr(buff, "r-xp") || strstr(buff, "r--p")) && strstr(buff, elf.data())) {
|
if ((buff[0] == '/' && (strstr(buff, "r-xp") || strstr(buff, "r--p"))) && strstr(buff, elf.data())) {
|
||||||
found = 1;
|
found = 1;
|
||||||
LOGD("found: %s", buff);
|
LOGD("found: %s", buff);
|
||||||
std::string_view b = buff;
|
std::string_view b = buff;
|
||||||
|
|
|
||||||
|
|
@ -67,7 +67,7 @@ namespace lspd {
|
||||||
void InitSymbolCache() {
|
void InitSymbolCache() {
|
||||||
LOGD("InitSymbolCache");
|
LOGD("InitSymbolCache");
|
||||||
sym_initialized = FindLibArt();
|
sym_initialized = FindLibArt();
|
||||||
sym_do_dlopen = SandHook::ElfImg("linker").getSymbAddress<void *>(
|
sym_do_dlopen = SandHook::ElfImg("/linker").getSymbAddress<void *>(
|
||||||
"__dl__Z9do_dlopenPKciPK17android_dlextinfoPKv");
|
"__dl__Z9do_dlopenPKciPK17android_dlextinfoPKv");
|
||||||
if (!sym_initialized) [[unlikely]] {
|
if (!sym_initialized) [[unlikely]] {
|
||||||
sym_initialized = false;
|
sym_initialized = false;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue