You copied the Doc URL to your clipboard.

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


This function attribute is a GNU compiler extension supported by the ARM compiler.



Where target is the target symbol.


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)


This attribute can only be used on functions with internal linkage.