From 1353c862d516864a1a96eabf44c3fded6720852a Mon Sep 17 00:00:00 2001 From: Patrick Georgi Date: Tue, 15 Jan 2019 17:06:49 +0100 Subject: chip/g: mark symbols used that are used from assembly code Otherwise LTO optimizes them away before finding out it, in fact, needs them - then complains. BRANCH=cr50, cr50-mp BUG=b:65253310 TEST=after the entire stack was applied Cr50 builds successfully with CONFIG_LTO enabled, and passes TCG test suite. Change-Id: I244e5bd3da18dddec636bbe1e99c229bc3af44ec Signed-off-by: Patrick Georgi Signed-off-by: Vadim Bendebury Reviewed-on: https://chromium-review.googlesource.com/1411542 --- chip/g/uart_bitbang.c | 2 +- chip/g/watchdog.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/chip/g/uart_bitbang.c b/chip/g/uart_bitbang.c index bb8e8cfec4..9f08340d3c 100644 --- a/chip/g/uart_bitbang.c +++ b/chip/g/uart_bitbang.c @@ -319,7 +319,7 @@ static int uart_bitbang_receive_char(uint8_t *rxed_char, uint32_t *next_tick) return EC_SUCCESS; } -void uart_bitbang_irq(void) +void __attribute__((used)) uart_bitbang_irq(void) { uint8_t rx_buffer[RX_BUF_SIZE]; size_t i = 0; diff --git a/chip/g/watchdog.c b/chip/g/watchdog.c index aa78fa675c..aa79367353 100644 --- a/chip/g/watchdog.c +++ b/chip/g/watchdog.c @@ -19,7 +19,7 @@ /* Watchdog expiration */ #define WATCHDOG_PERIOD (CONFIG_WATCHDOG_PERIOD_MS * (PCLK_FREQ / 1000)) -void trace_and_reset(uint32_t excep_lr, uint32_t excep_sp) +void __attribute__((used)) trace_and_reset(uint32_t excep_lr, uint32_t excep_sp) { watchdog_trace(excep_lr, excep_sp); system_reset(RESET_FLAG_WATCHDOG); -- cgit v1.2.1