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

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

It is an alternative to using the __weak keyword or the GCC weak and alias attributes.

Examples

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)
{
    ...
}
Related reference
10.60 __attribute__((alias)) variable attribute
10.31 __attribute__((alias)) function attribute
10.52 __attribute__((weak)) function attribute
10.71 __attribute__((weak)) variable attribute
Non-ConfidentialPDF file icon PDF versionARM DUI0472J
Copyright © 2010-2013 ARM. All rights reserved.