View mode: basic / threaded / horizontal-split · Log in · Help
July 29, 2008
Size of executable almost triples
I recently had to fix a little bug in an D application (win32). I thought that I would also be a good idea to upgrade to the most current version of the D compiler.
When upgrading to 1.033 from 1.025 the executable size almost tripled from 227 kb to 603 kb! After building with all version from 1.025 up I found that this phenomenon occurs when switching from 1.031 to 1.032.

Any ideas?

Stefan
July 29, 2008
Re: Size of executable almost triples
"Stefan" <Stefan.Liebig@compeople.de> wrote in message 
news:g6n37d$2dhc$1@digitalmars.com...
>I recently had to fix a little bug in an D application (win32). I thought 
>that I would also be a good idea to upgrade to the most current version of 
>the D compiler.
> When upgrading to 1.033 from 1.025 the executable size almost tripled from 
> 227 kb to 603 kb! After building with all version from 1.025 up I found 
> that this phenomenon occurs when switching from 1.031 to 1.032.
>
> Any ideas?
>
> Stefan
>

Bearophile noticed this when 1.032 came out, too.  There has not yet been 
any resolution as far as I know.
July 29, 2008
Re: Size of executable almost triples
On Tue, 29 Jul 2008 08:42:21 -0400, Stefan wrote:

> I recently had to fix a little bug in an D application (win32). I
> thought that I would also be a good idea to upgrade to the most current
> version of the D compiler. When upgrading to 1.033 from 1.025 the
> executable size almost tripled from 227 kb to 603 kb! After building
> with all version from 1.025 up I found that this phenomenon occurs when
> switching from 1.031 to 1.032.
> 
> Any ideas?
> 
> Stefan

Is there a bug report already? I haven't found one yet.
Such bloat is quite annoying.

Btw., you can always use "strip <program>" to reduce the binary size. Or 
even upx.
July 29, 2008
Re: Size of executable almost triples
Moritz Warning:
> Btw., you can always use "strip <program>" to reduce the binary size. Or 
> even upx.

What strip do you use for this? The strip I use isn't compatible:

strip:foo.exe: File format not recognized

BFD header file version (GNU Binutils) 2.18.50.20080109

Bye,
bearophile
July 29, 2008
Re: Size of executable almost triples
On Tue, 29 Jul 2008 11:39:25 -0400, bearophile wrote:

> Moritz Warning:
>> Btw., you can always use "strip <program>" to reduce the binary size.
>> Or even upx.
> 
> What strip do you use for this? The strip I use isn't compatible:
> 
> strip:foo.exe: File format not recognized
> 
> BFD header file version (GNU Binutils) 2.18.50.20080109
> 
> Bye,
> bearophile

I'm on linux, works fine there.
July 30, 2008
Re: Size of executable almost triples
Do you have a similar effect with Linux?
You mentioned strip, what does it exactly?

Stefan

Moritz Warning Wrote:

> On Tue, 29 Jul 2008 08:42:21 -0400, Stefan wrote:
> 
> > I recently had to fix a little bug in an D application (win32). I
> > thought that I would also be a good idea to upgrade to the most current
> > version of the D compiler. When upgrading to 1.033 from 1.025 the
> > executable size almost tripled from 227 kb to 603 kb! After building
> > with all version from 1.025 up I found that this phenomenon occurs when
> > switching from 1.031 to 1.032.
> > 
> > Any ideas?
> > 
> > Stefan
> 
> Is there a bug report already? I haven't found one yet.
> Such bloat is quite annoying.
> 
> Btw., you can always use "strip <program>" to reduce the binary size. Or 
> even upx.
July 30, 2008
Re: Size of executable almost triples
On Wed, 30 Jul 2008 02:11:27 -0400, Stefan wrote:

> Do you have a similar effect with Linux? You mentioned strip, what does
> it exactly?
> 
strip removes all debugging and symbol information from a binary.
Afaik, you can't link the binary afterwards or debug it properly,
but that's often no problem for release builds.

Anyway, it's not a workaround for the increased file size.
July 30, 2008
Re: Size of executable almost triples
Moritz Warning wrote:
> On Wed, 30 Jul 2008 02:11:27 -0400, Stefan wrote:
> 
>> Do you have a similar effect with Linux? You mentioned strip, what does
>> it exactly?
>>
> strip removes all debugging and symbol information from a binary.
> Afaik, you can't link the binary afterwards or debug it properly,
> but that's often no problem for release builds.
> 
> Anyway, it's not a workaround for the increased file size.

I ran into this problem earlier as i was developing IntelliD (which is 
not done yet!). The file size went up to 9 MB in size, i removed -g 
-debug symbols from my compilation command and i think it went down to 7 
or 8 MB. Using UPX i managed to get it size my files down to 2.5 MB 
which is good enough for a text-editor.
Top | Discussion index | About this forum | D home