Architecture selection

An architecture is a type of CPU on which an object file is to run. Its name may contain a colon, separating the name of the processor family from the name of the particular CPU.

The command to list valid architecture values is objdump -i.

Here's how to specify the architecture for the GNU utilities:

  1. -m command-line option
  2. Deduced from the input file.
objcopy, nm, size, strings
Deduced from the input file.
Input architecture is deduced from the input file.

Output architecture:

  1. OUTPUT_ARCH script command (see “Option Commands” in Using LD in the full online GNU documentation)
  2. Default architecture from the linker output target (see Target selection,” above).