heap2exec(1)

heap2exec1

Generate standalone executable from a *sml/nj* heap image.

Usage

heap2exec [{-32 | -64}] [LINKMODE] file

Overview

Under normal usage, SML/NJ represents a program as a heap-image file with a name of the form foo.arch-opsys Heap2exec generates a standalone executable from a heap image. You have the option to specify a preferred linking mode.

The default is to link statically on FreeBSD and Linux.

Note that heap2exec is an optional component of the SML/NJ installation process that is not included by default. Edit the config/targets file before installation to include it.

Options

-32

run the 32-bit version of the program (currently the default).

-64

run the 64-bit version of the program. This option only applies to the x86-64 (aka amd64) architecture.

-static, -linkwith-a

statically link the program with the runtime system. Static linking is the default on Linux and FreeBSD.

-dynamic, -linkwith-so

dynamically link the program with the runtime system.

Copying

Copyright © 2020 The Fellowship of SML/NJ

This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Author

Heap2exec was written by Matthias Blume.

Bugs

Heap2exec is limited to the x86 and amd64 architectures and to the macOS, Linux, and FreeBSD operating systems.

From smlnj 110.99.9-1 in Arch Linux 2026-11-01. Parsed by carta from the page's man source.