diff options
| author | Ulf Hermann <[email protected]> | 2017-04-07 13:34:10 +0200 |
|---|---|---|
| committer | Ulf Hermann <[email protected]> | 2017-05-02 12:43:15 +0000 |
| commit | 764dfcb97f5728cb7f4a20f38b3df5f8bd00e05f (patch) | |
| tree | 30b16069a01cdb363bdccd53b6b1f73f03ea9bdd /libelf | |
| parent | cb951df3eaff5228d3900f38b71e550425b72670 (diff) | |
Make sure packed structs follow the gcc memory layout
On windows gcc by default generates code that follows the MSVC layout.
We don't want that as it adds extra padding.
Change-Id: I92efe5da2a2ad818783707ee96a9b8e0eb606dbd
Reviewed-by: Christian Kandeler <[email protected]>
Diffstat (limited to 'libelf')
| -rw-r--r-- | libelf/gelf_xlate.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libelf/gelf_xlate.c b/libelf/gelf_xlate.c index f3d3b7a0..479f1436 100644 --- a/libelf/gelf_xlate.c +++ b/libelf/gelf_xlate.c @@ -74,7 +74,7 @@ union unaligned uint16_t u16; uint32_t u32; uint64_t u64; - } __attribute__ ((packed)); + } attribute_packed; #define FETCH(Bits, ptr) (((const union unaligned *) ptr)->u##Bits) #define STORE(Bits, ptr, val) (((union unaligned *) ptr)->u##Bits = val) |
