www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.learn - Stripper?

reply Andreas Kochenburger <akk nospam.org> writes:
Probably an old newbie question:
How can I reduce exe sizes? Is there a strip program like for gcc?
As I haven't tried gdc, how small could I get for a simple "hello world"?
Feb 08 2007
next sibling parent =?ISO-8859-15?Q?Jari-Matti_M=E4kel=E4?= <jmjmak utu.fi.invalid> writes:
Andreas Kochenburger kirjoitti:
 Probably an old newbie question:
 How can I reduce exe sizes? Is there a strip program like for gcc?
 As I haven't tried gdc, how small could I get for a simple "hello world"?
On Linux you can use strip to reduce the size of gdc/dmd generated binaries. If they are still too big, there's always executable packers, such as upx. I guess there are similar programs on Windows.
Feb 08 2007
prev sibling next sibling parent BCS <ao pathlink.com> writes:
Reply to Andreas,

 Probably an old newbie question:
 How can I reduce exe sizes? Is there a strip program like for gcc?
 As I haven't tried gdc, how small could I get for a simple "hello
 world"?
IIRC the problem is that DMD/phobos uses static linking for just about everything. So if you use writef you pull in huge amounts of stuff, same for just about everything else. It's a fixable problem but not one I know how to fix. I seem to remember that someone built tango into a .so but I could be wrong
Feb 08 2007
prev sibling next sibling parent Derek Parnell <derek nomail.afraid.org> writes:
On Thu, 08 Feb 2007 19:01:36 +0100, Andreas Kochenburger wrote:

 Probably an old newbie question:
 How can I reduce exe sizes? Is there a strip program like for gcc?
 As I haven't tried gdc, how small could I get for a simple "hello world"?
For Windows systems, I use UPX. The binary distribution file of Bud has been packed with UPX and it is very effective. -- Derek (skype: derek.j.parnell) Melbourne, Australia "Justice for David Hicks!" 9/02/2007 10:35:47 AM
Feb 08 2007
prev sibling parent Howard Berkey <howard well.com> writes:
Andreas Kochenburger Wrote:

 Probably an old newbie question:
 How can I reduce exe sizes? Is there a strip program like for gcc?
 As I haven't tried gdc, how small could I get for a simple "hello world"?
I'd be surprised if "strip" itself didn't work, as it depends on binary file format . In fact most of the binutils should work fine, no?
Feb 09 2007