I defined a struct in a header file, similar to this one:
struct STRUCT
{
char a;
int b;
};
This is parsed successfully by IDA, however it adds padding bytes after the char
:
00000000 STRUCT struc ; (sizeof=0x4)
00000000 a db ?
00000001 db ? ; undefined
00000002 b dw ?
00000004 STRUCT ends
I can't remove the padding field using u, so the question is: How can one remove padding fields automatically inserted by IDA, or how can one prevent IDA from creating padding fields?
#pragma pack(0)
? Does this syntax originate from MSVC? – heinrich5991 May 17 '13 at 13:44#pragma pack(push, 1)
/#pragma pack(pop)
– Igor Skochinsky May 17 '13 at 15:11__declspec(align(4)) char;
– Orwellophile Aug 20 '16 at 09:49