Skip to content
Snippets Groups Projects
Commit 8edf844f authored by Simon Glass's avatar Simon Glass Committed by Wolfgang Denk
Browse files

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: default avatarSimon Glass <sjg@chromium.org>
parent 71152395
Loading
...@@ -117,7 +117,8 @@ extern int do_reset(cmd_tbl_t *cmdtp, int flag, int argc, char * const argv[]); ...@@ -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_REPEAT 0x0001 /* repeat last command */
#define CMD_FLAG_BOOTD 0x0002 /* command is from bootd */ #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 #ifdef CONFIG_AUTO_COMPLETE
# define _CMD_COMPLETE(x) x, # define _CMD_COMPLETE(x) x,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment