Paul Manta
Paul Manta

Reputation: 31577

Why are there different sections for initialized and uninitialized globals?

I'm reading this course on the structure of an executable and it says there are three data sections in an executable:

My question is, why is the distinction made between initialized and uninitialized global data?

(We use C in class, but I guess this is a language agnostic subject.)

Upvotes: 0

Views: 69

Answers (1)

David Winant
David Winant

Reputation: 832

Image size. The program image has to contain the initialization data for .data, but it does not have to contain .bss.

Upvotes: 1

Related Questions