Liangxu Linux
Jul 14, 2024 · Fundamentals
Why Can Duplicate Global Variables Compile? Understanding Strong and Weak Symbols in C
This article explains why C programs can sometimes compile and run correctly even when global variables or functions are defined multiple times, by introducing symbol tables, the distinction between strong and weak symbols, and the linker rules that decide which definition is used.
CompilationLinkerglobal variables
0 likes · 7 min read
