Gcc/10.2.0/gcc/Weak-Pragmas
From Get docs
Next: Diagnostic Pragmas, Previous: Structure-Layout Pragmas, Up: Pragmas [Contents][Index]
6.62.12 Weak Pragmas
For compatibility with SVR4, GCC supports a set of #pragma
directives for declaring symbols to be weak, and defining weak
aliases.
#pragma weak symbol
This pragma declares
symbol
to be weak, as if the declaration had the attribute of the same name. The pragma may appear before or after the declaration ofsymbol
. It is not an error forsymbol
to never be defined at all.#pragma weak symbol1 = symbol2
This pragma declares
symbol1
to be a weak alias ofsymbol2
. It is an error ifsymbol2
is not defined in the current translation unit.