"robert song" <robertsong.linux@xxxxxxxxx> writes: > without -fdata-sections: > > 00010d20 <h_nerr>: > 10d20: 00000005 00000000 00000000 00000000 ................ > > 00010d30 <h_errlist>: > 10d30: 00000c24 00000c40 00000c50 00000c6c ...$...@...P...l > 10d40: 00000c84 00000000 00000000 00000000 ................ > > with -fdata-sections: > > 00010d30 <h_errlist>: > 10d30: 00000c30 00000c4c 00000c5c 00000c78 ...0...L...\...x > 10d40: 00000c90 .... > > 00010d44 <h_nerr>: > 10d44: 00000005 00000000 00000000 ............ I'm just guessing, but it looks like an alignment issue. It looks like the compiler is aligning h_errlist at a 16-byte boundary. That is causing an extra 4 zero bytes to be inserted in the "without -fdata-sections" case. Ian