Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Mar 2014 21:25:33 +0000 (UTC)
From:      Ian Lepore <ian@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r262696 - head/sys/arm/arm
Message-ID:  <201403022125.s22LPXgd078485@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ian
Date: Sun Mar  2 21:25:32 2014
New Revision: 262696
URL: http://svnweb.freebsd.org/changeset/base/262696

Log:
  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.

Modified:
  head/sys/arm/arm/mpcore_timer.c

Modified: head/sys/arm/arm/mpcore_timer.c
==============================================================================
--- head/sys/arm/arm/mpcore_timer.c	Sun Mar  2 19:46:03 2014	(r262695)
+++ head/sys/arm/arm/mpcore_timer.c	Sun Mar  2 21:25:32 2014	(r262696)
@@ -370,6 +370,7 @@ DRIVER_MODULE(mp_tmr, simplebus, arm_tmr
  *	nothing
  */
 static void
+__attribute__((used)) /* Must emit function code for the weak ref below. */
 arm_tmr_DELAY(int usec)
 {
 	int32_t counts_per_usec;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201403022125.s22LPXgd078485>