[U-Boot] [PATCH v6 12/20] sandbox: Force command sections to be 4-byte aligned

Wolfgang Denk wd at denx.de
Mon Oct 17 22:49:55 CEST 2011


Dear Simon Glass,

In message <1318270953-32482-13-git-send-email-sjg at chromium.org> you wrote:
> By default sections are 16-byte aligned on some architectures, but the
> command name structure (struct cmd_tbl_s) does not have padding to
> 16 bytes. We use the linker to collect elements of an array of
> these structures and then at run-time we want this array to be
> accessible.
> 
> If the linker puts padding between elements then we cannot access the
> array properly.
> 
> This change reduces the alignment to 4-bytes so that the command
> table can be accessed correctly on any architecture.
> 
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
> Changes in v4:
> - Add more info to command section alignment commit
> 
>  include/command.h |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Quantum Mechanics is God's version of "Trust me."


More information about the U-Boot mailing list