[Haskell-cafe] Re: Windows details

Jonathan Cast jonathanccast at fastmail.fm
Fri Sep 12 13:50:32 EDT 2008

On Fri, 2008-09-12 at 18:35 +0100, Andrew Coppin wrote:
> Jonathan Cast wrote:
> > On Fri, 2008-09-12 at 18:07 +0100, Andrew Coppin wrote:
> >   
> >> And what exactly does a "strip" mean, then?
> >>     
> >
> > Remove the symbol table.  And, for C, other debugging information.
> >
> > Historically, I believe, on Unix the distinction between an executable
> > and an object file was weaker than it is now (so, for example, a.out was
> > originally the default name of an object file, back when you didn't
> > always need to link in a library).  So (and this is still sometimes true
> > on linux) the linker's output could be used as input to the linker.
> > Unix linkers still include the combined symbol table in the executables
> > they generate, to allow this.  But if your executable is complete, you
> > don't need a symbol table, so Unix includes a program `strip' that
> > removes it from an executable (or object file, if you do something
> > stupid).
> >
> > GHC's Windows port, of course, uses a port of the Unix toolchain, so the
> > above discussion (almost) completely applies.  (Although I don't think
> > any (static) linker actually accepts Windows PE executables as input).
> >   
> That would certainly explain why the end of my compiled binary contains 
> several miles of ASCII that looks like function names then... ;-)
> So if I give GHC the right options, it'll do that for me?

Correct.  Finding the right option is left as a Google-enabled exercise
for the reader.


More information about the Haskell-Cafe mailing list