objdump -sSx a.out 产量,除其他外......
Sections:
Idx Name Size VMA LMA File off Algn
0 .interp 0000001c 0000000000400238 0000000000400238 00000238 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .note.ABI-tag 00000020 0000000000400254 0000000000400254 00000254 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .note.gnu.build-id 00000024 0000000000400274 0000000000400274 00000274 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .gnu.hash 0000001c 0000000000400298 0000000000400298 00000298 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .dynsym 00000048 00000000004002b8 00000000004002b8 000002b8 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .dynstr 00000038 0000000000400300 0000000000400300 00000300 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 .gnu.version 00000006 0000000000400338 0000000000400338 00000338 2**1
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .gnu.version_r 00000020 0000000000400340 0000000000400340 00000340 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
8 .rela.dyn 00000018 0000000000400360 0000000000400360 00000360 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
9 .rela.plt 00000018 0000000000400378 0000000000400378 00000378 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
10 .init 00000018 0000000000400390 0000000000400390 00000390 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
11 .plt 00000020 00000000004003b0 00000000004003b0 000003b0 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
12 .text 000001c8 00000000004003d0 00000000004003d0 000003d0 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
13 .fini 0000000e 0000000000400598 0000000000400598 00000598 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
14 .rodata 00000004 00000000004005a8 00000000004005a8 000005a8 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
15 .eh_frame_hdr 0000002c 00000000004005ac 00000000004005ac 000005ac 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
16 .eh_frame 000000a4 00000000004005d8 00000000004005d8 000005d8 2**3
CONTENTS, ALLOC, LOAD, READONLY, DATA
17 .ctors 00000010 0000000000600e28 0000000000600e28 00000e28 2**3
CONTENTS, ALLOC, LOAD, DATA
18 .dtors 00000010 0000000000600e38 0000000000600e38 00000e38 2**3
CONTENTS, ALLOC, LOAD, DATA
19 .jcr 00000008 0000000000600e48 0000000000600e48 00000e48 2**3
CONTENTS, ALLOC, LOAD, DATA
20 .dynamic 00000190 0000000000600e50 0000000000600e50 00000e50 2**3
CONTENTS, ALLOC, LOAD, DATA
21 .got 00000008 0000000000600fe0 0000000000600fe0 00000fe0 2**3
CONTENTS, ALLOC, LOAD, DATA
22 .got.plt 00000020 0000000000600fe8 0000000000600fe8 00000fe8 2**3
CONTENTS, ALLOC, LOAD, DATA
23 .data 00000010 0000000000601008 0000000000601008 00001008 2**3
CONTENTS, ALLOC, LOAD, DATA
24 .bss 00000040 0000000000601020 0000000000601020 00001018 2**5
ALLOC
25 .comment 0000002a 0000000000000000 0000000000000000 00001018 2**0
CONTENTS, READONLY
第 24 项,在“Algn”下,我们看到 2**5 或 2^5 aka 32。这表明 bss 是按 32 字节块分配的,因为它是 32 位对齐的。