svn commit: r262696 - head/sys/arm/arm

Ian Lepore ian at FreeBSD.org
Sun Mar 2 21:25:33 UTC 2014


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;


More information about the svn-src-all mailing list