9.52 __attribute__((weakref("target"))) function attribute

This function attribute marks a function declaration as an alias that does not by itself require a function definition to be given for the target symbol.

Note

This function attribute is a GNU compiler extension that the ARM compiler supports.

Syntax

__attribute__((weakref("target")))
Where target is the target symbol.

Examples

In the following example, foo() calls y() through a weak reference:
extern void y(void);
static void x(void) __attribute__((weakref("y")));
void foo (void)
{
  ...
  x();
  ...
}

Restrictions

This attribute can only be used on functions with static linkage.
Non-ConfidentialPDF file icon PDF versionARM DUI0375E
Copyright © 2007, 2008, 2011, 2012, 2014 ARM. All rights reserved.