Mach_ARM64_thread_state padded to (0 mod 8)

https://github.com/upx/upx/issues/446  (partial)
	modified:   p_mach.cpp
	modified:   p_mach.h
	modified:   p_mach_enum.h
This commit is contained in:
John Reiser 2021-01-30 16:11:32 -08:00 committed by Markus F.X.J. Oberhumer
parent 00139caf43
commit 2469563b26
3 changed files with 3 additions and 1 deletions

View File

@ -204,7 +204,7 @@ PackMachARMEL::PackMachARMEL(InputFile *f) : super(f, Mach_header::CPU_TYPE_ARM,
{ }
PackMachARM64EL::PackMachARM64EL(InputFile *f) : super(f, Mach_header::CPU_TYPE_ARM64,
Mach_header::MH_EXECUTE, (unsigned)Mach_thread_command::ARM_THREAD_STATE,
Mach_header::MH_EXECUTE, (unsigned)Mach_thread_command::ARM_THREAD_STATE64,
sizeof(Mach_ARM64_thread_state)>>2, sizeof(threado))
{ }

View File

@ -512,6 +512,7 @@ template <class TMachITypes> __packed_struct(Mach_ARM64_thread_state)
Xword x28, fp, lr, sp;
Xword pc;
Word cpsr;
Word pad; // to (0 mod 8)
__packed_struct_end()
} // namespace N_Mach64

View File

@ -157,6 +157,7 @@
x86_THREAD_STATE64 = 4,
i386_OLD_THREAD_STATE = -1,
ARM_THREAD_STATE = 1
, ARM_THREAD_STATE64 = 6 // also ARM_THREAD_STATE64_COUNT 68
};
#endif /*}*/