Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions extension/script/frontend/process_inject.lua
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ function _M.gdb_inject(pid, entry, injectdll, gdb_path)

local launcher = {
"-ex",
-- 6 = RTDL_NOW|RTDL_LOCAL
('print (void*)dlopen("%s", 6)'):format(injectdll),
-- 5 = RTDL_LAZY|RTDL_LOCAL
('print (void*)dlopen("%s", 5)'):format(injectdll),
"-ex",
('call ((void(*)())&%s)()'):format(entry),
"-ex",
Expand Down Expand Up @@ -93,8 +93,8 @@ function _M.lldb_inject(pid, entry, injectdll, lldb_path)

local launcher = {
"-o",
-- 6 = RTDL_NOW|RTDL_LOCAL
('expression (void*)dlopen("%s", 6)'):format(injectdll),
-- 5 = RTDL_LAZY|RTDL_LOCAL
('expression (void*)dlopen("%s", 5)'):format(injectdll),
"-o",
('expression ((void(*)())&%s)()'):format(entry),
"-o",
Expand Down
2 changes: 1 addition & 1 deletion src/process_inject/macos/shellcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ static void* rmain(void* ptr) {
// load lib
{
auto _dlopen = (decltype(&dlopen))arg.get_func("dlopen");
handler = _dlopen((const char*)arg.name, RTLD_NOW | RTLD_LOCAL);
handler = _dlopen((const char*)arg.name, RTLD_LAZY | RTLD_LOCAL);
}
if (!handler) {
auto ec = (const char*)_dlerror();
Expand Down