largo% readelf -S hello
There are 22 section headers, starting at offset 6d4:
[0] NULL 00000000 00000 00000 00 / 0 0 0 0
[1] .interp PROGBITS 080000d4 000d4 00017 00 / 2 0 0 1
[2] .hash HASH 080000ec 000ec 00094 04 / 2 3 0 4
[3] .dynsym DYNSYM 08000180 00180 00120 10 / 2 4 1 4
[4] .dynstr STRTAB 080002a0 002a0 000b5 00 / 2 0 0 1
[5] .rel.bss REL 08000358 00358 00010 08 / 2 3 11 4
[6] .rel.plt REL 08000368 00368 00028 08 / 2 3 8 4
[7] .init PROGBITS 08000390 00390 00008 00 / 6 0 0 10
[8] .plt PROGBITS 08000398 00398 00060 04 / 6 0 0 4
[9] .text PROGBITS 08000400 00400 000f4 00 / 6 0 0 10
[a] .fini PROGBITS 08000500 00500 00008 00 / 6 0 0 10
[b] .rodata PROGBITS 08000508 00508 0000d 00 / 2 0 0 1
[c] .data PROGBITS 08001518 00518 00004 00 / 3 0 0 4
[d] .ctors PROGBITS 0800151c 0051c 00008 00 / 3 0 0 4
[e] .dtors PROGBITS 08001524 00524 00008 00 / 3 0 0 4
[f] .got PROGBITS 0800152c 0052c 00020 04 / 3 0 0 4
[10] .dynamic DYNAMIC 0800154c 0054c 00098 08 / 3 4 0 4
[11] .bss NOBITS 080015e4 005e4 00008 00 / 3 0 0 4
[12] .comment PROGBITS 00000000 005e4 00056 00 / 0 0 0 1
[13] .shstrtab STRTAB 00000000 0063a 0009a 00 / 0 0 0 1
[14] .symtab SYMTAB 00000000 00a44 003c0 10 / 0 15 28 4
[15] .strtab STRTAB 00000000 00e04 001a7 00 / 0 0 0 1
Figure 2. Section Table for hello.o
When Linked Into an Executable
Listing 2. Section Table for hello.o When Linked Into an Executable
Copyright © 1994 - 2019 Linux Journal. All rights reserved.