/proc/self/exe support

This commit is contained in:
2025-12-11 12:25:52 +01:00
parent 9ac107b398
commit da69c60ffd
3 changed files with 61 additions and 3 deletions

View File

@@ -52,6 +52,9 @@ pub var address_allocator: AddressAllocator = .empty;
pub var allocated_pages: std.AutoHashMapUnmanaged(u64, void) = .empty;
pub var mutex: std.Thread.Mutex = .{};
pub var target_exec_path_buf: [std.fs.max_path_bytes]u8 = @splat(0);
pub var target_exec_path: []const u8 = undefined;
/// Initialize the patcher.
/// NOTE: This should only be called **once**.
pub fn init() !void {