weak
In this section:
Syntax
#pragma weaksymbol1[=symbol2]
Parameters
| A function or variable with external linkage. |
| A defined function or variable. |
Description
This pragma directive can be used in one of two ways:
To make the definition of a function or variable with external linkage a weak definition. The
__weakattribute can also be used for this purpose.To create a weak alias for another function or variable. You can make more than one alias for the same function or variable.
Example
To make the definition of foo a weak definition, write:
#pragma weak foo
To make NMI_Handler a weak alias for Default_Handler, write:
#pragma weak NMI_Handler=Default_Handler
If NMI_Handler is not defined elsewhere in the program, all references to NMI_Handler will refer to Default_Handler.