1elf-arch(1)                 General Commands Manual                elf-arch(1)
2
3
4

NAME

6       elf-arch - recognize architecture of an ELF executable/shlib
7

SYNOPSIS

9       elf-arch <file>
10              says the arch of given binary
11
12       elf-arch -a <arch> <file>
13              checks if <file> matches ABI <arch>
14

DESCRIPTION

16       elf-arch  detects  the  kernel  ABI  needed  to run a given binary, and
17       prints its Debian arch name.  This doesn't necessarily  mean  the  arch
18       can  actually  run  that program/library: markings available in the ELF
19       header are pretty much restricted to just word  width,  endianness  and
20       instruction  set  family.   Architectures can also differ by the set of
21       syscalls they use (although these can usually be mixed) or required CPU
22       instructions;  you can't generally distinguish between those other than
23       trying to run the program.
24
25       The difference usually shows in the kernel refusing to run a binary  vs
26       executing it and crashing at runtime.
27
28       Thus,  as far as ELF markings are concerned, there's often a set of De‐
29       bian architectures which are aliases for the same kernel arch.
30
31   -a <arch>
32       With this option, elf-arch instead of printing the  detected  architec‐
33       ture  will check if <arch> matches one of aliases for the file, and re‐
34       turn an exit code: 0 if there's a  plausible  match,  non-zero  if  the
35       given arch won't even try executing that file.
36
37
38
39                                                                   elf-arch(1)
Impressum