Contents|Index|Previous|Next

Target Selection

A target is an object file format. A given target may be supported for multiple architectures (see Architecture Selection ). A target selection may also have variations for different operating systems or architectures.

The command to list valid target values is objdump -i (the first column of output contains the relevant information).

Some sample values are: a.out-hp300bsd, ecoff-littlemips, a.out-sunos-big.

objdump Target

Ways to specify:

- command line option: -b or--target
- environment variable GNUTARGET
- deduced from the input file

objcopy and strip Input Target

Ways to specify:

- command line options, -I, --input-target, -F, or --target
- environment variable, GNUTARGET
- deduced from the input file

objcopy and strip Output Target

Ways to specify:

- command line options, -O, --output-target, -F, or --target
- the input target (see objcopy and strip Input Target)
- environment variable, GNUTARGET
- deduced from the input file

nm, size, and strings Target

Ways to specify:

- command line option, --target
- environment variable GNUTARGET
- deduced from the input file

Linker Input Target

Ways to specify:

- command line option, -b or --format (see Command Line Options in Using LD)
- script command, TARGET (see Option Commands in Using LD)
- environment variable, GNUTARGET (see Environment Variables in Using LD)
- the default target of the selected linker emulation (see Linker Emulation Selection).

Linker Output Target

Ways to specify:

- command line option, -oformat (see Command Line Options in Using LD)
- script command, OUTPUT_FORMAT (see Option Commands in Using LD)
- the linker input target (see Linker Input Target)