aboutsummaryrefslogtreecommitdiff
path: root/sys/arm/arm/mpcore_timer.c
diff options
context:
space:
mode:
authorIan Lepore <ian@FreeBSD.org>2014-03-02 21:25:32 +0000
committerIan Lepore <ian@FreeBSD.org>2014-03-02 21:25:32 +0000
commit45b1c8bbda1a9a980553831679145e8b2f50c6ae (patch)
treea1ce1a77cb459a0a3fdbbbea4af7e1ff8d46efd1 /sys/arm/arm/mpcore_timer.c
parentf5a477a34baa2461a9a42a3ecb4783c04ce9201c (diff)
downloadsrc-45b1c8bbda1a9a980553831679145e8b2f50c6ae.tar.gz
src-45b1c8bbda1a9a980553831679145e8b2f50c6ae.zip
Add __attribute__((used)) so that the delay implementation doesn't get
optimized away as unreferenced, causing linker errors when trying to resolve the weak reference to the missing function.
Notes
Notes: svn path=/head/; revision=262696
Diffstat (limited to 'sys/arm/arm/mpcore_timer.c')
-rw-r--r--sys/arm/arm/mpcore_timer.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/arm/arm/mpcore_timer.c b/sys/arm/arm/mpcore_timer.c
index 19f41301e703..b37c0fd8f749 100644
--- a/sys/arm/arm/mpcore_timer.c
+++ b/sys/arm/arm/mpcore_timer.c
@@ -370,6 +370,7 @@ DRIVER_MODULE(mp_tmr, simplebus, arm_tmr_driver, arm_tmr_devclass, 0, 0);
* nothing
*/
static void
+__attribute__((used)) /* Must emit function code for the weak ref below. */
arm_tmr_DELAY(int usec)
{
int32_t counts_per_usec;