4.6 #pragma weak symbol, #pragma weak symbol1 = symbol2

This pragma is a language extension to mark symbols as weak or to define weak aliases of symbols.

Example

In the following example, weak_fn is declared as a weak alias of __weak_fn:
extern void weak_fn(int a);
#pragma weak weak_fn = __weak_fn
void __weak_fn(int a)
{
    ...
}
Non-ConfidentialPDF file icon PDF versionARM DUI0774E
Copyright © 2014-2016 ARM. All rights reserved.