[MLton-user] A few questions

Vesa Karvonen vesa.a.j.k at gmail.com
Sat Dec 15 06:08:06 PST 2007


On Dec 15, 2007 3:43 PM, Matthew Fluet <fluet at tti-c.org> wrote:
> On Wed, 12 Dec 2007, Vesa Karvonen wrote:
[...]
> > Looking at man ld shows option:
> >
> >       -s
> >       --strip-all
> >           Omit all symbol information from the output file.
> >
> > Specifying -link-opt -s to MLton seems to have the same effect as
> > compiling with MLton and then separately stripping the executable.
> >
> > Perhaps -s should be specified by default and omitted when -debug true
> > is explicitly specified.
>
> When gcc compiles an executable, it doesn't strip, so I'm not sure that it
> is the right option to always strip.

Well, I don't know for sure either.  However, googling a bit and
reading some man pages, I get the impression that it should be safe to
strip executables.  I guess it may have been historically unsafe (e.g.
stripping symbols needed for relocation), but I get the impression
that it isn't the case anymore.  OTOH, I get the impression that
stripping shared libs may cause problems.  The (non-debug) symbols are
needed in shared libs to make it possible to link to the library
dynamically.

> > Looking at man as shows option:
> >
> >       --strip-local-absolute
> >           Remove local absolute symbols from the outgoing symbol table.
>
> Mac OS X doesn't use a GNU binutils as, and this option doesn't exist on
> that platform.

AFAICT, it also shouldn't have any effect on the final (stripped)
executable.  So, there is no absolute reason to use it.

-Vesa Karvonen



More information about the MLton-user mailing list