diff options
author | Bi, Dandan <dandan.bi@intel.com> | 2018-02-08 22:28:39 +0800 |
---|---|---|
committer | Liming Gao <liming.gao@intel.com> | 2018-02-09 17:04:15 +0800 |
commit | 6b86f6f336b9ccfdc27b718100c31b2aed5d7bb1 (patch) | |
tree | f2b3b8eec76bad1d46398085cc3505de0b9bf443 /BaseTools/Source/Python/GenFds/CompressSection.py | |
parent | ce2697abeb37cf9fabab15327385415599e8fb0c (diff) | |
download | edk2-6b86f6f336b9ccfdc27b718100c31b2aed5d7bb1.tar.gz edk2-6b86f6f336b9ccfdc27b718100c31b2aed5d7bb1.tar.bz2 edk2-6b86f6f336b9ccfdc27b718100c31b2aed5d7bb1.zip |
MdeModulePkg/DriverSampleDxe: Make bit fields aligned in C structure
For a structure with a series of bit fields and used as a storage
in vfr file, and if the bit fields do not add up to the size of
the defined type.In the C code use sizeof() to get size of the
structure, the results may vary form the compiler(VS,GCC...).
But the size of the storage calculated by VfrCompiler is fixed
(calculate with alignment).To avoid the issue cased by above case,
we need to make the total width of the bit fields in the structure
aligned with the size of the defined type for these bit fields.
Cc: Eric Dong <eric.dong@intel.com>
Cc: Liming Gao <liming.gao@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Dandan Bi <dandan.bi@intel.com>
Reviewed-by: Liming Gao <liming.gao@intel.com>
Diffstat (limited to 'BaseTools/Source/Python/GenFds/CompressSection.py')
0 files changed, 0 insertions, 0 deletions