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:
Ryan Lin 2014-10-13 14:22:38 -07:00 committed by chrome-internal-fetch
commit c3fc03bc2e

View file

@ -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