summaryrefslogtreecommitdiffstats
path: root/sys/arm
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-03-02 21:25:32 +0000
committerian <ian@FreeBSD.org>2014-03-02 21:25:32 +0000
commitf13342ade493ec4dd025f15d53d7f37aa845c538 (patch)
treea1ce1a77cb459a0a3fdbbbea4af7e1ff8d46efd1 /sys/arm
parent1aa753817ed982a7b689f1ae3f2d4c479f81bc7d (diff)
downloadFreeBSD-src-f13342ade493ec4dd025f15d53d7f37aa845c538.zip
FreeBSD-src-f13342ade493ec4dd025f15d53d7f37aa845c538.tar.gz
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.
Diffstat (limited to 'sys/arm')
-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 19f4130..b37c0fd 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;
OpenPOWER on IntegriCloud