> if you are using GNU tools there is some magic to make them
> garbage-collect all the symbols in your executable before 
> outputting the
> final code. you have to do some tricks with the segment 
> headers so that
> it can GC individual functions but this should fix many of the image
> size problems at least in some cases. I agree that the GHC image sizes
> are a problem. 

This is something we'd like to do, but haven't got around to.  It's not
just a case of adding the correct flags to gcc/ld unfortunately: GHC's
assembly mangler needs to be taught how to generate the unique section
names for each function.  But then it's possible that we could remove
the grotty -split-objs stuff that we use to split the libraries into
small pieces. 

Cheers,
        Simon

>       John
> 
> On Fri, Dec 14, 2001 at 01:28:20PM +0100, Jan de Wit wrote:
> > Hi,
> > 
> > > I just recently starting to use the ghc compiler and am 
> astonished by the
> > > size of the executables. Out of interest, why are they so 
> large? Is there
> > > any work in progress to make the resulting 
> executable/object somewhat more
> > > "normal" in size?
> > >
> > > I read in the Haskell mailing list archives discussions 
> relating to
> > reducing
> > > the barriers to broader acceptance of functional 
> programming by the
> > general
> > > programming community (in particular Haskell) - I would 
> regard this as one
> > > of these barriers.
> > 
> > When I want to send compiled Haskell programs by email or 
> put them on the
> > web for distribution, I run 'strip' on them and, if I'm on 
> Linux or Win32, I
> > run UPX on it as well. UPX is an executable packer, see
> > http://upx.sourceforge.net/ for details. This routinely 
> brings programs down
> > from over 2 MB to around 250Kb which is small enough for me.
> > 
> > Hope this helps,
> > 
> > Jan de Wit
> > 
> > 
> > 
> > _______________________________________________
> > Glasgow-haskell-users mailing list
> > [EMAIL PROTECTED]
> > http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
> > 
> 
> -- 
> --------------------------------------------------------------
> -------------
> John Meacham - California Institute of Technology, Alum. - 
> [EMAIL PROTECTED]
> --------------------------------------------------------------
> -------------
> 
> _______________________________________________
> Glasgow-haskell-users mailing list
> [EMAIL PROTECTED]
> http://www.haskell.org/mailman/listinfo/glasgow-haskell-users
> 

_______________________________________________
Glasgow-haskell-users mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users

Reply via email to