[MLton-user] A few questions

Vesa Karvonen vesa.a.j.k at gmail.com
Wed Dec 12 10:03:11 PST 2007


On Dec 12, 2007 5:20 PM, Matthew Fluet <fluet at tti-c.org> wrote:
[...]
> You might look into options that can be passed to gcc/as (that is, gcc
> used as an assembler) or to gcc/ld (that is, gcc used as a linker).  A lot
> of the assembly labels are local to the file being assembled, so perhaps
> there is a way to instruct the assembler to strip local labels from the
> object file.  Similarly, perhaps there is an option that can be passed to
> the linker to instruct it to strip labels from the final executable.

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.

Looking at man as shows option:

       --strip-local-absolute
           Remove local absolute symbols from the outgoing symbol table.

I haven't tested what the effect of using that option with MLton is,
but if it reduces the amount of data that goes into the object files,
it might even slightly reduce compile/link time.

-Vesa Karvonen



More information about the MLton-user mailing list