Skip to content

Commit

Permalink
Fix wrong KC segment name, thanks @mhaeuser (#84)
Browse files Browse the repository at this point in the history
`__PRELINK_TEXT` was a deprecated marker segment that broke with macOS 13 b3; `__TEXT_EXEC` is the actual inner kernel segment
  • Loading branch information
PMheart committed Jul 7, 2022
1 parent c094420 commit 37e93c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Lilu/Sources/kern_mach.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -828,7 +828,7 @@ kern_return_t MachInfo::kcGetRunningAddresses(mach_vm_address_t slide) {

if (loadCmd->cmd == LC_SEGMENT_64) {
segment_command_64 *segCmd = reinterpret_cast<segment_command_64 *>(loadCmd);
if (!strncmp(segCmd->segname, "__PRELINK_TEXT", sizeof(segCmd->segname))) {
if (!strncmp(segCmd->segname, "__TEXT_EXEC", sizeof(segCmd->segname))) {
inner = reinterpret_cast<mach_header_64 *>(segCmd->vmaddr);
break;
}
Expand Down

0 comments on commit 37e93c6

Please sign in to comment.