diff options
author | Vincent Palatin <vpalatin@chromium.org> | 2012-05-15 00:41:54 +0000 |
---|---|---|
committer | Vincent Palatin <vpalatin@chromium.org> | 2012-05-15 01:32:44 +0000 |
commit | 33b03d5a39e7a09a41ba7f6d5d7ff4c1875a3cb1 (patch) | |
tree | f154477680d64625e98d64e12d275c14c82725d2 /include/console.h | |
parent | 35b1b7bf907ea9ffedc1c0134d5be9488ff1dd70 (diff) | |
download | chrome-ec-33b03d5a39e7a09a41ba7f6d5d7ff4c1875a3cb1.tar.gz |
Sort console commands at build time
Use the linker to sort console commands by name,
this saves execution time and memory.
BUG=none
TEST=generate several images with 5N, 5N+1, 5N-1 commands and check the
output of the "help" command.
Change-Id: Ib5d8f3bca726621c68ab152f4fa662cee355abb1
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Diffstat (limited to 'include/console.h')
-rw-r--r-- | include/console.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/console.h b/include/console.h index c2785cc545..4a655387da 100644 --- a/include/console.h +++ b/include/console.h @@ -83,7 +83,7 @@ void console_has_input(void); #define DECLARE_CONSOLE_COMMAND(name, routine) \ static const char __con_cmd_label_##name[] = #name; \ const struct console_command __con_cmd_##name \ - __attribute__((section(".rodata.cmds"))) \ + __attribute__((section(".rodata.cmds." #name))) \ = {__con_cmd_label_##name, routine} #endif /* __CROS_EC_CONSOLE_H */ |