int main() { int a; int b = 0; return 0; }
使用readelf a.out -wi可以看到变量a没有分配槽位
<2><92>: Abbrev Number: 5 (DW_TAG_variable) <93> DW_AT_name : a <95> DW_AT_decl_file : 1 <96> DW_AT_decl_line : 7 <97> DW_AT_type : <0x2c> <2><9b>: Abbrev Number: 6 (DW_TAG_variable) <9c> DW_AT_name : b <9e> DW_AT_decl_file : 1 <9f> DW_AT_decl_line : 8 <a0> DW_AT_type : <0x2c> <a4> DW_AT_location : 2 byte block: 91 50 (DW_OP_fbreg: -48)