Files
ReZygisk/loader/src/injector/entry.cpp
ThePedroo b94ea0c5f5 improve: port ptracer to C
This commit ports the C++ to C99 from zygisk-ptracer code, allowing a ~3x size reduce in its binary.
2025-04-16 02:02:26 -03:00

27 lines
537 B
C++

#include "daemon.h"
#include "logging.h"
#include "zygisk.hpp"
using namespace std;
void *start_addr = nullptr;
size_t block_size = 0;
extern "C" [[gnu::visibility("default")]]
void entry(void* addr, size_t size, const char* path) {
LOGD("Zygisk library injected, version %s", ZKSU_VERSION);
start_addr = addr;
block_size = size;
if (!rezygiskd_ping()) {
LOGE("Zygisk daemon is not running");
return;
}
LOGD("start plt hooking");
hook_functions();
clean_trace(path, 1, 0, false);
}