Skip to content

Commit

Permalink
Fix wrong KC segment name, thanks @mhaeuser and @PMheart
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

Commit derived from acidanthera/Lilu@37e93c6
  • Loading branch information
ExtremeXT authored Jul 7, 2022
1 parent c55f0e0 commit b90684f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion AMDRyzenCPUPowerManagement/symresolver/kernel_resolver.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ void find_mach_header_addr(uint8_t kc){
for (uint32_t i = 0; i < mach_header->ncmds; i++) {
if (lcp->cmd == LC_SEGMENT_64) {
seg_command_64_t *sc = (seg_command_64_t*)lcp;
if (!strncmp(sc->segname, "__PRELINK_TEXT", sizeof(sc->segname))) {
if (!strncmp(sc->segname, "__TEXT_EXEC", sizeof(sc->segname))) {
mh_base_addr = sc->vmaddr;
break;
}
Expand Down

0 comments on commit b90684f

Please sign in to comment.