summaryrefslogtreecommitdiff
path: root/chip/g/watchdog.c
diff options
context:
space:
mode:
authorPatrick Georgi <pgeorgi@google.com>2019-01-15 17:06:49 +0100
committerChromeOS Commit Bot <chromeos-commit-bot@chromium.org>2019-02-12 00:26:42 +0000
commit32d7e1b71bf7cb9fb94b0f6872ee7071537bded1 (patch)
tree15eab158291678f9e1a2ae31c2750313ce208683 /chip/g/watchdog.c
parent2fd46639f27f017917d1814cb13212829c691e19 (diff)
downloadchrome-ec-32d7e1b71bf7cb9fb94b0f6872ee7071537bded1.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 (cherry picked from commit 1353c862d516864a1a96eabf44c3fded6720852a) Reviewed-on: https://chromium-review.googlesource.com/c/1465092
Diffstat (limited to 'chip/g/watchdog.c')
-rw-r--r--chip/g/watchdog.c2
1 files changed, 1 insertions, 1 deletions
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);