Answering your question: the startup code has its own data. That data is shown in this example.
How the segments are called is implementation defined but most startup code & linker scripts use this most popular one.
.text - your program code
.rodata - RO only data - for example string literals. Many implemetations put there objects with the const (const int x[2] = {1,2};) will go there
.bss - uninitialized data with the static storage (ie global)
In C, statically-allocated objects without an explicit initializer are
initialized to zero (for arithmetic types) or a null pointer (for
pointer types). Implementations of C typically represent zero values
and null pointer values using a bit pattern consisting solely of
zero-valued bits (though this is not required by the C standard).
Hence, the BSS segment typically includes all uninitialized objects
(both variables and constants) declared at file scope (i.e., outside
any function) as well as uninitialized static local variables (local
variables declared with the static keyword); static local constants
must be initialized at declaration, however, as they do not have a
separate declaration, and thus are typically not in the BSS section,
though they may be implicitly or explicitly initialized to zero. An
implementation may also assign statically-allocated variables and
constants initialized with a value consisting solely of zero-valued
bits to the BSS section.
.data -
The .data segment contains any global or static variables which have a
pre-defined value and can be modified. That is any variables that are
not defined within a function (and thus can be accessed from anywhere)
or are defined in a function but are defined as static so they retain
their address across subsequent calls.
example:
static char x[] = "Hello world";
String literal ""Hello world" is stored in the .rodata segment and it copied during the startup to the char table x, located in the .data segment.
main(). It has to setupagrv[], for example. Most of the time, an initialization loop is involved because data you don't explicitly initialize is placed in.bssand must therefore be set to0before your program can start ... etc. pp. - user2371524