understanding size command for data bss segment in C

后端 未结 3 665
滥情空心
滥情空心 2021-01-05 15:03

I\'m getting unexpected output from size command.

Afaik initialized global and static variables stored in data segment and uninitialized

3条回答
  •  粉色の甜心
    2021-01-05 15:35

    BSS only contains static and global values which are not explicitly initialized. Even though you are explicitly initializing it to the same value to which it would be initialized if it were not initialized explicitly, the fact of explicit initialization means it doesn't belong in bss.

提交回复
热议问题