Let’s see...
Succinctly, simplistically and considering Linux, the C, the GCC, Assembly and the compilation phases:
- Global and static data not initialized and initialized with 0 are placed in the section
.BSS;
- Data initialized with non-zero values are allocated to the section
.DATA or .RODATA in the case of constants;
- When compiling into object (using
-c in GCC), the uninitialized data goes to the section COMMON - which exists in the GCC by backward compatibility. When connected (linking) to form the executable, are played in the section .BSS filled with zero as required;
Probably other compilers and Sos behave similarly but with some behavioral differences. For example, fill a data not initialized completely with zeros or even do it at runtime as needed.
Responding
Thus, given the above basis, we have the following:
- The symbol
b is assigned to local data not initialized, populated from zero by the program developer or initializer. They are placed in .BSS;
- The symbol
B is assigned to uninitialized global data, filled from zero by the program developer or initializer. They are placed on .BSS;
- The symbol
C is assigned to uninitialized data when the 'link' (linking) phase is skipped. They are placed in COMMON as they may contain other similar references;