Boost logo

Boost-Build :

From: C. Andy Martin (andy_at_[hidden])
Date: 2004-11-24 12:48:30


> Oh! And out of curiosity, what decrease in time/size is there for
> Boost.Python. KDE folks report about 5%, IIRC, but there are not as many
> templates.

In my project which uses Boost.Python, I have taken a look at the ELF
headers to see why the file is so big. It turns out that the dyanmic
symbol table takes up more space than the code text (which due to
templates is still pretty large for what the extension does). Here is a
sample:

PySuiteCommon.so: file format elf32-i386

Sections:
Idx Name Size VMA LMA File off Algn
0 .hash 00008348 000000d4 000000d4 000000d4 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
1 .dynsym 00010cd0 0000841c 0000841c 0000841c 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .dynstr 000a0e0b 000190ec 000190ec 000190ec 2**0
CONTENTS, ALLOC, LOAD, READONLY, DATA
3 .gnu.version 0000219a 000b9ef8 000b9ef8 000b9ef8 2**1
CONTENTS, ALLOC, LOAD, READONLY, DATA
4 .gnu.version_r 000000a0 000bc094 000bc094 000bc094 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
5 .rel.dyn 00006618 000bc134 000bc134 000bc134 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
6 .rel.plt 00003048 000c274c 000c274c 000c274c 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
7 .init 00000017 000c5794 000c5794 000c5794 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
8 .plt 000060a0 000c57ac 000c57ac 000c57ac 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
9 .text 0007e270 000cb850 000cb850 000cb850 2**4
CONTENTS, ALLOC, LOAD, READONLY, CODE
10 .fini 0000001b 00149ac0 00149ac0 00149ac0 2**2
CONTENTS, ALLOC, LOAD, READONLY, CODE
11 .rodata 0000c9e3 00149ae0 00149ae0 00149ae0 2**5
CONTENTS, ALLOC, LOAD, READONLY, DATA
12 .eh_frame_hdr 000042b4 001564c4 001564c4 001564c4 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
13 .data 00002998 0015b780 0015b780 0015a780 2**5
CONTENTS, ALLOC, LOAD, DATA
14 .eh_frame 00012e70 0015e118 0015e118 0015d118 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
15 .gcc_except_table 000079ec 00170f88 00170f88 0016ff88 2**2

Compare the size of .dynsym and .dynstr to .text. The combined size of
.dynsym and .dynstr is 727771 (decimal) bytes. The file size is 1551168
bytes, so just the dynamic symbol information is half the file! The
combined size of .dynsym and .dynstr is around 40% larger than that of
.text!

 


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk