if a global or static C variable is not explicitly initialized, but implicitly initialized, is it in .data or .bss section?

Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
Computer Systems: A Programmer's Perspective says about two sections in a ELF relocatable object file:
.data Initialized global and static C variables. Local C variables are maintained
at run time on the stack and do not appear in either the .data or .bss
sections..bss Uninitialized global and static C variables, along with any global or static
variables that are initialized to zero. This section occupies no actual space
in the object ï¬Âle; it is merely a placeholder. Object ï¬Âle formats distinguish
between initialized and uninitialized variables for space efï¬Âciency: unini-
tialized variables do not have to occupy any actual disk space in the object
ï¬Âle. At run time, these variables are allocated in memory with an initial
value of zero.
Do "initialized" and "unitiailized" in the quote mean explicitly or implicitly or either?
if a global or static C variable is not explicitly initialized, but implicitly initialized, is it in .data or .bss section?
Does it matter whether the global or static C variable is implicitly initialized to zero or nonzero?
Thanks.
elf
add a comment |Â
up vote
0
down vote
favorite
Computer Systems: A Programmer's Perspective says about two sections in a ELF relocatable object file:
.data Initialized global and static C variables. Local C variables are maintained
at run time on the stack and do not appear in either the .data or .bss
sections..bss Uninitialized global and static C variables, along with any global or static
variables that are initialized to zero. This section occupies no actual space
in the object ï¬Âle; it is merely a placeholder. Object ï¬Âle formats distinguish
between initialized and uninitialized variables for space efï¬Âciency: unini-
tialized variables do not have to occupy any actual disk space in the object
ï¬Âle. At run time, these variables are allocated in memory with an initial
value of zero.
Do "initialized" and "unitiailized" in the quote mean explicitly or implicitly or either?
if a global or static C variable is not explicitly initialized, but implicitly initialized, is it in .data or .bss section?
Does it matter whether the global or static C variable is implicitly initialized to zero or nonzero?
Thanks.
elf
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
Computer Systems: A Programmer's Perspective says about two sections in a ELF relocatable object file:
.data Initialized global and static C variables. Local C variables are maintained
at run time on the stack and do not appear in either the .data or .bss
sections..bss Uninitialized global and static C variables, along with any global or static
variables that are initialized to zero. This section occupies no actual space
in the object ï¬Âle; it is merely a placeholder. Object ï¬Âle formats distinguish
between initialized and uninitialized variables for space efï¬Âciency: unini-
tialized variables do not have to occupy any actual disk space in the object
ï¬Âle. At run time, these variables are allocated in memory with an initial
value of zero.
Do "initialized" and "unitiailized" in the quote mean explicitly or implicitly or either?
if a global or static C variable is not explicitly initialized, but implicitly initialized, is it in .data or .bss section?
Does it matter whether the global or static C variable is implicitly initialized to zero or nonzero?
Thanks.
elf
Computer Systems: A Programmer's Perspective says about two sections in a ELF relocatable object file:
.data Initialized global and static C variables. Local C variables are maintained
at run time on the stack and do not appear in either the .data or .bss
sections..bss Uninitialized global and static C variables, along with any global or static
variables that are initialized to zero. This section occupies no actual space
in the object ï¬Âle; it is merely a placeholder. Object ï¬Âle formats distinguish
between initialized and uninitialized variables for space efï¬Âciency: unini-
tialized variables do not have to occupy any actual disk space in the object
ï¬Âle. At run time, these variables are allocated in memory with an initial
value of zero.
Do "initialized" and "unitiailized" in the quote mean explicitly or implicitly or either?
if a global or static C variable is not explicitly initialized, but implicitly initialized, is it in .data or .bss section?
Does it matter whether the global or static C variable is implicitly initialized to zero or nonzero?
Thanks.
elf
elf
asked 2 mins ago
Tim
24.2k69233424
24.2k69233424
add a comment |Â
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f476895%2fif-a-global-or-static-c-variable-is-not-explicitly-initialized-but-implicitly-i%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password