.data と .bss のアラインメントは、4 バイトの場合もあれば 32 バイトの場合もあります。例 1: 以下の出力の最後の列によると、bss とデータのアラインメントは 32 バイトです。
bash-3.00$ readelf --sections libmodel.so
There are 39 section headers, starting at offset 0x1908a63c:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
...
[25] .data PROGBITS 01e221e0 1e211e0 26ca54 00 WA 0 0 32
[26] .bss NOBITS 0208ec40 208dc34 374178 00 WA 0 0 32
...
例 2: 以下の出力によると、アラインメント os .data および .bss は 4 バイトです。
bash-3.00$ readelf --sections ./a.out
There are 28 section headers, starting at offset 0x78c:
Section Headers:
[Nr] Name Type Addr Off Size ES Flg Lk Inf Al
...
[22] .data PROGBITS 0804956c 00056c 000034 00 WA 0 0 4
[23] .bss NOBITS 080495a0 0005a0 000004 00 WA 0 0 4
...
.bss と .data のアラインメントは何によって決定されますか? 4 バイトの場合と 32 バイトの場合があるのはなぜですか?