In what segment (.BSS, .DATA, other) of an executable file are static variables stored so that they don\'t have name collision? For example:
foo.c:
When a program is loaded into memory, it’s organized into different segments. One of the segment is DATA segment. The Data segment is further sub-divided into two parts:
Initialized data segment: All the global, static and constant data are stored here.
Uninitialized data segment(BSS): All the uninitialized data are stored in this segment.
Here is a diagram to explain this concept:
here is very good link explaining these concepts:
http://www.inf.udec.cl/~leo/teoX.pdf