3.36 __attribute__((weak)) variable attribute

Generates a weak symbol for a variable, rather than the default symbol.

extern int foo __attribute__((weak));

At link time, strong symbols override weak symbols. This attribute replaces a weak symbol with a strong symbol, by choosing a particular combination of object files to link.

Non-ConfidentialPDF file icon PDF versionDUI0774J
Copyright © 2014–2017, 2019 Arm Limited or its affiliates. All rights reserved.