required
In this section:
Syntax
#pragma required=symbolParameters
| Any statically linked function or variable. |
Description
Use this pragma directive to ensure that a symbol which is needed by a second symbol is included in the linked output. The directive must be placed immediately before the second symbol.
Use the directive if the requirement for a symbol is not otherwise visible in the application, for example, if a variable is only referenced indirectly through the section it resides in.
Example
const char copyright[] = "Copyright by me";
#pragma required=copyright
int main()
{
/* Do something here. */
}Even if the copyright string is not used by the application, it will still be included by the linker and available in the output.