From mboxrd@z Thu Jan 1 00:00:00 1970 From: Wolfgang Denk Date: Mon, 17 Oct 2011 22:49:55 +0200 Subject: [U-Boot] [PATCH v6 12/20] sandbox: Force command sections to be 4-byte aligned In-Reply-To: <1318270953-32482-13-git-send-email-sjg@chromium.org> References: <1318270953-32482-1-git-send-email-sjg@chromium.org> <1318270953-32482-13-git-send-email-sjg@chromium.org> Message-ID: <20111017204955.7279F140797D@gemini.denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Dear Simon Glass, In message <1318270953-32482-13-git-send-email-sjg@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 > --- > 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."