wheatley: Add CONFIG_LTO definition to reduce FW size.

Add CONFIG_LTO definition to reduce the size of FW image.

Modified drivers:
1. board.h: Add CONFIG_LTO definition.
2. header.c: Add __keep keyword to prevent linker ignore header during
optimization.

BUG=chrome-os-partner:34346
TEST=make buildall -j; test nuvoton IC specific drivers
BRANCH=none

Change-Id: I6205af37572a68f35f90dbd9b28d86230533ca8b
Signed-off-by: Mulin Chao <mlchao@nuvoton.com>
Reviewed-on: https://chromium-review.googlesource.com/319799
Reviewed-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
Mulin Chao
2015-12-28 18:04:21 +08:00
committed by chrome-bot
parent eebef1b8fd
commit 8d99bd9345
2 changed files with 2 additions and 1 deletions

View File

@@ -51,6 +51,7 @@
#define CONFIG_LID_ANGLE_SENSOR_LID 2
#define CONFIG_LID_SWITCH
#define CONFIG_LOW_POWER_IDLE
#define CONFIG_LTO
#define CONFIG_POWER_BUTTON
#define CONFIG_POWER_BUTTON_X86
#define CONFIG_POWER_COMMON

View File

@@ -57,7 +57,7 @@ struct __packed fw_header_t {
uint32_t sig_fw_image; /* The CRC or Checksum of the firmware image */
} __aligned(1);
__attribute__ ((section(".header")))
__keep __attribute__ ((section(".header")))
const struct fw_header_t fw_header = {
/* 00 */ SIG_FW_EC,
/* 04 */ 0x54E1, /* Header CRC check Enable/Disable -> AB1Eh/54E1h */