Bss Section Data Section
You can declare various constant values file names or buffer size etc in this section.
Bss section data section. The syntax for declaring bss section is section bss the text section. For instance a variable defined as static int i. That is the section alignment meaning this section when loaded will always be a multiple of 4 bytes.
This is best explained with following global extern variable. An object file is divided into sections containing different types of data. The syntax for declaring data section is section data the bss section.
Would be contained in the bss segment. This data does not change at runtime. However if we look back at the bss section header we see the last column al is 4.
These blocks are called sections and can be allocated into memory in a variety of ways to. Some systems have other kinds of sections. The bss section is used for declaring variables.
The bss segment also known as uninitialized data is usually adjacent to the data segment. And the bss section which holds uninitialized data. The next multiple up from 5 is 8 and that s why the bss section is 8 bytes.
It is often referred to as the bss section or bss segment. Since some variables may not have values until the program is executed it becomes a waste of space to declare and allocate space in the executable file. In this article the terms segment and section have the same meaning.