[MLton-user] A few questions

Matthew Fluet fluet at tti-c.org
Sat Dec 15 05:43:41 PST 2007


On Wed, 12 Dec 2007, Vesa Karvonen wrote:
> 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.

When gcc compiles an executable, it doesn't strip, so I'm not sure that it 
is the right option to always strip.

> 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.



More information about the MLton-user mailing list