summaryrefslogtreecommitdiff
path: root/include/command.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2011-09-17 06:48:51 +0000
committerWolfgang Denk <wd@denx.de>2011-10-17 23:56:58 +0200
commit8edf844f1b652bc81604d9b5fab59e2fa80fe3af (patch)
tree51f2fe36e6908ea69ff444482f8d7fed86ac769c /include/command.h
parent711523958f620a9834c822f905c87ed892b32ec4 (diff)
downloadu-boot-8edf844f1b652bc81604d9b5fab59e2fa80fe3af.tar.gz
u-boot-8edf844f1b652bc81604d9b5fab59e2fa80fe3af.tar.bz2
u-boot-8edf844f1b652bc81604d9b5fab59e2fa80fe3af.zip
sandbox: Force command sections to be 4-byte aligned
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. This reduces the alignment to 4-bytes so that the command table can be accessed correctly on any architecture. (Note: this needs doing properly) Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/command.h')
-rw-r--r--include/command.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/include/command.h b/include/command.h
index f1accd0953..c2701101d5 100644
--- a/include/command.h
+++ b/include/command.h
@@ -117,7 +117,8 @@ extern int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]);
#define CMD_FLAG_REPEAT 0x0001 /* repeat last command */
#define CMD_FLAG_BOOTD 0x0002 /* command is from bootd */
-#define Struct_Section __attribute__ ((unused,section (".u_boot_cmd")))
+#define Struct_Section __attribute__((unused, section(".u_boot_cmd"), \
+ aligned(4)))
#ifdef CONFIG_AUTO_COMPLETE
# define _CMD_COMPLETE(x) x,