### Produce an Executable File

The linker produces executable files by default. To explicitly identify the output file as an executable, use the /EXEC option.

An executable file is one that can be executed directly: you can run the program by typing the name of the file. In contrast, dynamic link library files execute when they are called by other processes, and cannot be run independently.

To reduce the size of the executable file and improve its performance, use the following options:

- /ALIGNFILE:n to set the file alignment for sections in the output file. Set n to smaller factors to reduce the size of the executable. Larger factors may reduce load time for the executable.
  By default, the alignment is set to 16.
  By default, the alignment is set to 512.
- /OPTFUNC (once your code is tested and stable) to remove unreachable functions.
  Note: Your code must have been compiled with the /Gl+ compiler option.

If you do not specify an extension for the output file name, the linker automatically adds the extension .exe to the name you provide. If you do not specify an output filename at all, the linker generates an executable file with the same filename as the first object file it linked.

Linker Output
Example of a Definition File for an Executable Module in OS/2