|
|
Log in / Subscribe / Register

Not a "bloated, monolithic system"?

Not a "bloated, monolithic system"?

Posted Jan 29, 2019 20:20 UTC (Tue) by zblaxell (subscriber, #26385)
In reply to: Not a "bloated, monolithic system"? by zdzichu
Parent article: Systemd as tragedy

> Systemd binary size is not directly related to code bloat.

Indeed, a size comparison that doesn't use the output of 'size' or 'objdump' is mostly meaningless. Buried in megabytes of executable are kilobytes of code.


to post comments

Not a "bloated, monolithic system"?

Posted Jan 29, 2019 21:42 UTC (Tue) by mathstuf (subscriber, #69389) [Link]

Here's the output from bloaty:
% ./bloaty -d segments =init
     VM SIZE                     FILE SIZE
 --------------               --------------
  48.9%   724Ki LOAD [RX]       724Ki  45.2%
  33.9%   502Ki LOAD [R]        502Ki  31.4%
  17.1%   253Ki LOAD [RW]       253Ki  15.8%
   0.0%       0 [Unmapped]      119Ki   7.5%
   0.0%       0 [ELF Headers]  1.94Ki   0.1%
 100.0%  1.45Mi TOTAL          1.56Mi 100.0%
So we have half of it is code, a third is static data, and another fifth for globals(?). For per-section:
     VM SIZE                             FILE SIZE
 --------------                       --------------
  46.7%   691Ki .text                   691Ki  43.2%
  16.5%   243Ki .data.rel.ro            243Ki  15.2%
  14.0%   206Ki .rodata                 206Ki  12.9%
   0.0%       0 .gnu.build.attributes   110Ki   6.9%
   6.9%   102Ki .rela.dyn               102Ki   6.4%
   5.9%  87.9Ki .eh_frame              87.9Ki   5.5%
   1.8%  26.1Ki .dynsym                26.1Ki   1.6%
   1.6%  24.3Ki .rela.plt              24.3Ki   1.5%
   1.3%  19.6Ki .dynstr                19.6Ki   1.2%
   1.2%  17.6Ki .gcc_except_table      17.6Ki   1.1%
   1.1%  16.2Ki .plt                   16.2Ki   1.0%
   1.1%  16.2Ki .plt.sec               16.2Ki   1.0%
   0.9%  13.7Ki .eh_frame_hdr          13.7Ki   0.9%
   0.0%       0 [Unmapped]             8.57Ki   0.5%
   0.6%  8.50Ki .got                   8.50Ki   0.5%
   0.0%     736 [ELF Headers]          2.66Ki   0.2%
   0.1%  2.17Ki .gnu.version           2.17Ki   0.1%
   0.0%     727 [15 Others]            1.05Ki   0.1%
   0.0%     672 .dynamic                  672   0.0%
   0.0%     496 .gnu.version_r            496   0.0%
   0.0%     416 .bss                        0   0.0%
 100.0%  1.45Mi TOTAL                  1.56Mi 100.0%


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds