You copied the Doc URL to your clipboard.

Arm Compiler armclang Reference Guide : __attribute__((weakref("target"))) function attribute

__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.

Syntax

__attribute__((weakref("target")))

Where target is the target symbol.

Example

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.

Was this page helpful? Yes No