coreboot: force 4-byte alignment for init structure with GCC 4.9
Force 4-byte alignment for .bs_init section to ensure that no padding data is added to init structures. BUG=chromium:416651 BRANCH=none TEST=build firmware with GCC 4.9 and test on Auron and Rambi. Change-Id: I3f94cd419b5951fdc6e5749576c4df2cc44f8a24 Signed-off-by: Ryan Lin <ryan.lin@intel.com> Reviewed-on: https://chromium-review.googlesource.com/223116 Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-by: Kenji Chen <kenji.chen@intel.com> Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
This commit is contained in:
parent
55ed3bc880
commit
c3fc03bc2e
1 changed files with 2 additions and 1 deletions
|
|
@ -176,7 +176,8 @@ struct boot_state_init_entry {
|
|||
struct boot_state_callback bscb;
|
||||
};
|
||||
|
||||
#define BOOT_STATE_INIT_ATTR __attribute__ ((used,section (".bs_init")))
|
||||
#define BOOT_STATE_INIT_ATTR \
|
||||
__attribute__ ((used, aligned(4), section(".bs_init")))
|
||||
|
||||
#define BOOT_STATE_INIT_ENTRIES(name_) \
|
||||
static struct boot_state_init_entry name_[] BOOT_STATE_INIT_ATTR
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue