.bss vs COMMON: what goes where?

前端 未结 4 2222
离开以前
离开以前 2020-12-03 17:10

From my book:

.bss:

Uninitialized global C variables

COMMON:

Uninitalized data objects that are n

4条回答
  •  失恋的感觉
    2020-12-03 17:21

    static variables end up in the .bss section.Un-initialised global variables (not static) goes in .common section.

    static a;  //bss
    int c;   //.common
    main(){
    }
    

提交回复
热议问题