Warning: main(/www/www/htdocs/style/globals.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/targets.html on line 1
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/globals.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/targets.html on line 1
Warning: main(/www/www/htdocs/style/header.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/targets.html on line 8
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/header.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/targets.html on line 8
This appendix describes how you can specify targets and architectures
for the ELF utilities.
|
The development tools automatically take care of this —
you'll probably never need to worry about it. |
You can specify three aspects of the target system to the
utilities that work on ELF files, each in several ways:
- target — the object file format
- architecture — the type of CPU the target file is to run on
- linker emulation (which applies to the linker only) — a
“personality” that specifies default values for the target
system.
In the following summaries, the lists of ways to specify values are in
order of decreasing precedence; the ways listed first override those
listed later.
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: elf32-i386, elf32-littlemips,
and elf32-powerpc.
Here's how to specify the target for the ELF utilities:
- objdump
-
- -b command-line option
- GNUTARGET environment variable
- Deduced from the input file.
- objcopy, strip
-
Input target:
- -I or -F command-line option
- GNUTARGET environment variable
- Deduced from the input file.
Output target:
- -O or -F command-line option
- Input target (see above)
- GNUTARGET environment variable
- Deduced from the input file.
- nm, size, and strings
-
- --target command-line option
- GNUTARGET environment variable
- Deduced from the input file.
- ld
-
Input target:
- -b command-line option
- TARGET script command
(see “Option Commands” in Using LD in the full
online GNU documentation)
- GNUTARGET environment variable
- Default target of the selected linker emulation
(see “Linker emulation
selection,” below)
Output target:
- --oformat command-line option
- OUTPUT_FORMAT script command
(see “Option Commands” in Using LD in the full
online GNU documentation)
- Linker input target (see above).
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.
Sample values include powerpc:commonand mips.
Here's how to specify the architecture for the GNU utilities:
- objdump
-
- -m command-line option
- Deduced from the input file.
- objcopy, nm, size, strings
-
Deduced from the input file.
- ld
-
Input architecture is deduced from the input file.
Output architecture:
- OUTPUT_ARCH script command
(see “Option Commands” in Using LD in the full
online GNU documentation)
- Default architecture from the linker output target (see
“Target selection,”
above).
A linker emulation is a “personality” of the linker;
it gives
the linker default values for the other aspects of the target system.
In particular, it consists of the linker script, the target, and
several “hook” functions that are run at certain stages
of the linking
process to do special things that some targets require.
The command to list valid linker emulation values is ld -V.
Sample values include i386nto, elf32mipnto,
and elf32ppcnto.
Ways to specify:
- -m command-line option
- LDEMULATION environment variable
- Compiled-in DEFAULT_EMULATION from Makefile,
which comes from EMUL in
config/target.mt.
Warning: main(/www/www/htdocs/style/footer.php) [function.main]: failed to open stream: No such file or directory in /www/www/docs/6.4.1/neutrino/utilities/targets.html on line 368
Warning: main() [function.include]: Failed opening '/www/www/htdocs/style/footer.php' for inclusion (include_path='.:/www/www/common:/www/www/php/lib/php') in /www/www/docs/6.4.1/neutrino/utilities/targets.html on line 368