From f788d76b8cb1533a23a8a0b834e123fd4989832e Mon Sep 17 00:00:00 2001 From: "Markus F.X.J. Oberhumer" Date: Sun, 13 Mar 2005 16:09:46 +0000 Subject: [PATCH] Added several __attribute_packed. committer: mfx 1110730186 +0000 --- src/p_mach.h | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/src/p_mach.h b/src/p_mach.h index 0d1f0d7e..1495de2b 100644 --- a/src/p_mach.h +++ b/src/p_mach.h @@ -53,7 +53,8 @@ struct Mach_header { enum { MH_NOUNDEFS = 1 }; -}; +} +__attribute_packed; struct Mach_segment_command { BE32 cmd; @@ -78,7 +79,8 @@ struct Mach_segment_command { BE32 initprot; BE32 nsects; BE32 flags; -}; +} +__attribute_packed; struct Mach_section { char sectname[16]; @@ -115,7 +117,8 @@ struct Mach_section { BE32 reserved1; BE32 reserved2; -}; +} +__attribute_packed; struct Mach_ppc_thread_state { BE32 srr0; /* Instruction address register (PC; entry addr) */ @@ -146,10 +149,13 @@ struct Mach_thread_command { PPC_THREAD_STATE_COUNT = sizeof(struct Mach_ppc_thread_state)/4 }; struct Mach_ppc_thread_state state; -}; +} +__attribute_packed; + #include "p_unix.h" + class PackMachPPC32 : public PackUnixBe32 { typedef PackUnixBe32 super;