Try harder to decompress Mach-O I386, too.

modified:   p_mach.cpp
	modified:   p_mach.h
This commit is contained in:
John Reiser
2016-09-24 09:15:10 -07:00
parent 093362e479
commit df19f0d5ec
2 changed files with 7 additions and 0 deletions
+6
View File
@@ -1938,6 +1938,12 @@ upx_uint64_t PackMachBase<T>::getEntryVMA(Mach_command const *ptr)
return ptr->cmd; // FIXME must be specialized return ptr->cmd; // FIXME must be specialized
} }
upx_uint64_t PackMachI386::getEntryVMA(Mach_command const *ptr)
{
Mach_thread_command const *tc = (Mach_thread_command const *)ptr;
return tc->state.eip;
}
upx_uint64_t PackMachAMD64::getEntryVMA(Mach_command const *ptr) upx_uint64_t PackMachAMD64::getEntryVMA(Mach_command const *ptr)
{ {
Mach_thread_command const *tc = (Mach_thread_command const *)ptr; Mach_thread_command const *tc = (Mach_thread_command const *)ptr;
+1
View File
@@ -875,6 +875,7 @@ protected:
virtual Linker* newLinker() const; virtual Linker* newLinker() const;
virtual void buildLoader(const Filter *ft); virtual void buildLoader(const Filter *ft);
virtual void addStubEntrySections(Filter const *); virtual void addStubEntrySections(Filter const *);
virtual upx_uint64_t getEntryVMA(Mach_command const *);
__packed_struct(Mach_thread_command) __packed_struct(Mach_thread_command)
LE32 cmd; /* LC_THREAD or LC_UNIXTHREAD */ LE32 cmd; /* LC_THREAD or LC_UNIXTHREAD */