summaryrefslogtreecommitdiff
path: root/include/mkbp_event.h
diff options
context:
space:
mode:
authorShawn Nematbakhsh <shawnn@chromium.org>2016-05-25 15:08:00 -0700
committerchrome-bot <chrome-bot@chromium.org>2016-05-25 22:55:43 -0700
commit798a50ca0eea00ae6ff2339783e14c6c9240bb84 (patch)
tree9f446b1261b5f5bf5885524835ee0bf5af6e4ef8 /include/mkbp_event.h
parentb756628c7e76957ba2115bfde7c819a1e981c12f (diff)
downloadchrome-ec-798a50ca0eea00ae6ff2339783e14c6c9240bb84.tar.gz
mkbp_event: Don't discard event source structures due to LTO
BUG=chrome-os-partner:53729 BRANCH=None TEST=Manual on gru. Verify .rodata.evtsrcs section is non-empty in ec.RO.map. Verify that we're no longer spammed with HC 0x67 (due to constantly asserted interrupt). Change-Id: I57ad1ba7fbdd99dfab84341560aff094ce9bc5b6 Signed-off-by: Shawn Nematbakhsh <shawnn@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/347415 Commit-Ready: Shawn N <shawnn@chromium.org> Tested-by: Shawn N <shawnn@chromium.org> Reviewed-by: Aseda Aboagye <aaboagye@chromium.org>
Diffstat (limited to 'include/mkbp_event.h')
-rw-r--r--include/mkbp_event.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/mkbp_event.h b/include/mkbp_event.h
index 8da19fc02d..6e97c2e973 100644
--- a/include/mkbp_event.h
+++ b/include/mkbp_event.h
@@ -29,9 +29,9 @@ struct mkbp_event_source {
int (*get_data)(uint8_t *data);
};
-#define DECLARE_EVENT_SOURCE(type, func) \
- const struct mkbp_event_source __evt_src_##type \
- __attribute__((section(".rodata.evtsrcs"))) \
+#define DECLARE_EVENT_SOURCE(type, func) \
+ const struct mkbp_event_source __keep __evt_src_##type \
+ __attribute__((section(".rodata.evtsrcs"))) \
= {type, func}
#endif /* __CROS_EC_MKBP_EVENT_H */