summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2019-01-15 17:06:49 +0100
committerchrome-bot <chrome-bot@chromium.org>2019-02-07 03:02:05 -0800
commit1353c862d516864a1a96eabf44c3fded6720852a (patch)
treeb7088996b670c680061999e65719c15d843a9764
parent10dc115665f8b1f3e7a61ba24505d782564712f8 (diff)
downloadchrome-ec-1353c862d516864a1a96eabf44c3fded6720852a.tar.gz
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 <pgeorgi@google.com> Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/1411542
-rw-r--r--chip/g/uart_bitbang.c2
-rw-r--r--chip/g/watchdog.c2
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);