[coreboot] [Coreboot] Misalignment with GCC 4.9.1

Lin, Ryan ryan.lin at intel.com
Tue Oct 14 02:59:24 CEST 2014


Hi Peter,

It should be unpatched GCC 4.9, and I found out that .bs_init is force 32-byte alignment with GCC 4.9.

Dump from ramstage.o

12 .bs_init      000000c8  00000000  00000000  00036160  2**5
                  CONTENTS, ALLOC, LOAD, RELOC, DATA


As the result, padding datd is added to mrc_cache_update, pch_log and cbmem_bscb.

0001d1d0 T _bs_init_begin
0001d1e0 t mrc_cache_update <- 32 bytes
0001d200 t pch_log <- 32 bytes
0001d220 t finalize
0001d248 t spi_init_bscb
0001d25c t cbmem_bscb <- 36 bytes
0001d280 t disable_rom_cache_bscb
0001d2a8 T _bs_init_end

If we add aligned(4) to the define as the following :

#define BOOT_STATE_INIT_ATTR  __attribute__ ((used, aligned(4), section (".bs_init)))

We can get 4-byte alignment for .bs_init.

What is your thoughts on this?


Regards,
Ryan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.coreboot.org/pipermail/coreboot/attachments/20141014/305556be/attachment.html>


More information about the coreboot mailing list