Weak Symbol

A type of "symbol" (in other words, virtually any named program entity) which corresponds to a function or other code which might be multiply defined in several different object files (the things the linker links together) and which the linker should unify.

If the multiple weak symbol definitions all are equal (the same function), no problem. If not--it's either a linker error, or UndefinedBehavior results (comparing two function definitions for equality is expensive and error-prone).

In contrast, a normal text symbol will always produce a linker error if redundantly defined.


CategoryLinker


EditText of this page (last edited December 9, 2004) or FindPage with title or text search