more unpacking for Mach-o (pre-3.91 ?)

modified:   p_mach.cpp
	modified:   p_mach.h
This commit is contained in:
John Reiser
2016-11-05 13:16:16 -07:00
parent 5c0340f9ae
commit 2635472896
2 changed files with 73 additions and 2 deletions
+5 -2
View File
@@ -1617,9 +1617,12 @@ int PackMachBase<T>::canUnpack()
}
}
else if (Mach_segment_command::LC_UNIXTHREAD==ptr->cmd) {
rip = entryVMA;
rip = entryVMA = threadc_getPC(ptr);
}
}
}
if (391==style && 0==offLINK && 2==ncmds) { // pre-3.91 ?
offLINK = ptrTEXT->fileoff + ptrTEXT->filesize; // fake __LINKEDIT at EOF
}
if (0 == style || 0 == offLINK) {
return false;
}