comp.lang.ada
 help / color / mirror / Atom feed
From: "Rego, P." <pvrego@gmail.com>
Subject: Re: Size optimization for objects
Date: Mon, 1 Jul 2013 07:35:10 -0700 (PDT)
Date: 2013-07-01T07:35:10-07:00	[thread overview]
Message-ID: <b0586a20-1c93-49ad-b4c5-0a19f6288371@googlegroups.com> (raw)
In-Reply-To: <70b1d2b0-d5ab-431e-84b9-9f00af08dbe2@googlegroups.com>

Hello Rolf,

On Sunday, June 30, 2013 8:34:30 AM UTC-3, rrr.e...@gmail.com wrote:
> strip(1) reduces the size of an application in the file system by removing the debug info.
So it's not the best option, because I am trying to reduce the application size in order to be able to debug the app. A new added code caused the app to grow beyond I expected, so now I am not able to debug it anymore. I think the best is to analyse using nm. But also probably there is more code (than the newest added one) I should optimize.
 
> If you want to see the size of various elements in a binary use nm(1). nm --print-size --size-sort might give you some hints where to start remving elements.
I am still having some difficult in understand the information generated by nm. It generates something like
00c038d6 ff42d001 D ___gl_locking_policy

The first column I think it's the "symbol value", the second column I guess it's the size of the symbol. The other columns are ok, since the man nm explains quite well. What does "symbol value" mean? 

Also, the second column represents the symbol size (in bytes I presume). If I sum all the symbol sizes, should the total sum give the size of the executable file? I tried this, but the total sum is far bigger than the real size of the application binary.

> If you compile with -fdata-sections -ffunction-sections and link with --gc-sections the linker automatically removes all unused code and all unused data. That is typically easier than gnatelim.
I also will try this. 

Thanks,
Rego.


  reply	other threads:[~2013-07-01 14:35 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-06-28 19:49 Size optimization for objects Rego, P.
2013-06-29  7:10 ` Georg Bauhaus
2013-07-01 13:56   ` Rego, P.
2013-07-01 16:49     ` G.B.
2013-06-29  9:48 ` Jack Daniels
2013-07-01 13:58   ` Rego, P.
2013-06-30 11:34 ` rrr.eee.27
2013-07-01 14:35   ` Rego, P. [this message]
2013-07-01 15:28     ` Niklas Holsti
2013-07-01 16:35       ` Rego, P.
2013-07-01 18:21         ` Niklas Holsti
2013-07-02 20:32           ` Rego, P.
2013-07-06 16:06             ` Niklas Holsti
2013-07-10 11:57               ` Rego, P.
2013-07-10 11:58                 ` Rego, P.
2013-07-11  9:10                   ` Niklas Holsti
2013-07-18 14:09                     ` Rego, P.
2013-07-18 14:10                       ` Rego, P.
2013-07-11  8:35                 ` Niklas Holsti
2013-07-12  0:35                   ` Randy Brukardt
2013-07-18 15:16                     ` Rego, P.
2013-07-18 15:12                   ` Rego, P.
2013-07-18 17:57                     ` Niklas Holsti
2013-07-19  5:02                     ` Randy Brukardt
2013-07-19 13:20                       ` Eryndlia Mavourneen
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox