LINK.EXE Machine Types

For each of the machine names that LINK and LIB accept in their /machine option, the following table shows the corresponding numerical machine type, such as appears in object files and executables.

Machine Name Machine Type
AM33 0x01D3
AMD64 (with alias X86-64) 0x8664
ARM 0x01C0
IA64 0x0200
M32R 0x9041
MIPS 0x0166
MIPS16 0x0266
MIPSFPU 0x0366
MIPSFPU16 0x0466
MIPSR41XX 0x0166
PPC 0x01F0
PPCFP 0x01F1
SH3 0x01A2
SH3DSP 0x01A3
SH4 0x01A6
SH5 0x01A8
THUMB 0x01C2
TRICORE 0x0520
X86 (with aliases I386 and IX86) 0x014C

Although MIPS and MIPSR41XX select the same machine type, they are not aliases. Distinctions are maintained in both the page size (which becomes the default section alignment) and in the maximum permitted number of sections.

For most of the supported machines, the page size is 0x1000 bytes and LINK permits as many as 96 sections without warning. The following table lists the machines that vary from the usual.

Machine Page Size Maximum Section Count
IA64 0x2000 198
MIPSR41XX 0x0400 19
SH3 0x0400 19
SH3DSP 0x0400 19
SH4   19

Compatible Machines

When the target machine has been set with a /machine option or has been inferred, it is ordinarily a fatal error (LNK1112) to ask LINK or LIB to work with any module that specifies a different machine type. However, some differences are tolerated.

The most straightforward are when the target machine is a more advanced but compatible version of the module machine. When the target machine is less advanced, the difference is tolerated only if the target machine had been inferred, i.e., had not been set expliclity with a /machine option. In such cases, the inference is seen to have been conservative and the machine specified in the module becomes the new target machine.

Module Machine Compatible Target Machines
ARM THUMB
MIPS MIPS16
MIPS16 MIPS and MIPSR41XX, if /machine not set explicitly
MIPSFPU MIPSFPU16
MIPSFPU16 MIPSFPU, if /machine not set explicitly
MIPSR41XX MIPS16
SH3 SH3DSP
SH3DSP SH3, if /machine not set explicitly
THUMB ARM, if /machine not set explicitly