Why Bss and Data Segment Separate?

Why Bss and Data Segment Separate?

bss segment is described by a single number, probably 4 bytes or 8 bytes, that gives its size in the running process, whereas the . data section is as big as the sum of sizes of the initialized variables. Thus, the . bss makes the executables smaller and quicker to load.

What is the difference between data and BSS segments?

What is the difference between the Data and BSS sections? BSS refers to uninitialized global and static objects and Data refers to initialized global and static objects. ... bsct (zero page data) sections are used to reserve space for initialized global and static objects.

What is BSS part of data segment?

The BSS segment contains uninitialized static data, both variables and constants, i.e. global variables and local static variables that are initialized to zero or do not have explicit initialization in source code.

Sophia Al-Mansoor
Author

Sophia Al-Mansoor

Sophia analyzes international trade, startup ecosystems, retail transformation, and supply chain logistics for modern digital publications.