1SETARCH(8)                   System Administration                  SETARCH(8)
2
3
4

NAME

6       setarch  -  change reported architecture in new program environment and
7       set personality flags
8

SYNOPSIS

10       setarch arch [options] [program [argument...]]
11
12       arch [options] [program [argument...]]
13
14       setarch --list|-h|-V
15

DESCRIPTION

17       setarch currently only affects the output of uname -m.  For example, on
18       an AMD64 system, running setarch i386 program will cause program to see
19       i686 instead of x86_64 as the machine type.  It also allows to set var‐
20       ious personality options.  The default program is /bin/sh.
21

OPTIONS

23       --list List  the  architectures  that  setarch  knows  about.   Whether
24              setarch can actually set each of these architectures depends  on
25              the running kernel.
26
27       --uname-2.6
28              Causes the program to see a kernel version number beginning with
29              2.6.  Turns on UNAME26.
30
31       -v, --verbose
32              Be verbose.
33
34       -3, --3gb
35              Specifies program should use a maximum of 3GB of address  space.
36              Supported on x86.  Turns on ADDR_LIMIT_3GB.
37
38       --4gb  This option has no effect.  It is retained for backward compati‐
39              bility only, and may be removed in future releases.
40
41       -B, --32bit
42              Limit the address space to 32 bits to  emulate  hardware.   Sup‐
43              ported on ARM and Alpha.  Turns on ADDR_LIMIT_32BIT.
44
45       -F, --fdpic-funcptrs
46              Treat  user-space function pointers to signal handlers as point‐
47              ers to address descriptors.  This option has no effect on archi‐
48              tectures  that  do  not  support  FDPIC ELF binaries.  In kernel
49              v4.14 support is limited to ARM,  Blackfin,  Fujitsu  FR-V,  and
50              SuperH CPU architectures.
51
52       -I, --short-inode
53              Obsolete bug emulation flag.  Turns on SHORT_INODE.
54
55       -L, --addr-compat-layout
56              Provide  legacy virtual address space layout.  Use when the pro‐
57              gram binary does not have PT_GNU_STACK  ELF  header.   Turns  on
58              ADDR_COMPAT_LAYOUT.
59
60       -R, --addr-no-randomize
61              Disables  randomization  of the virtual address space.  Turns on
62              ADDR_NO_RANDOMIZE.
63
64       -S, --whole-seconds
65              Obsolete bug emulation flag.  Turns on WHOLE_SECONDS.
66
67       -T, --sticky-timeouts
68              This makes select(2), pselect(2), and ppoll(2) system calls pre‐
69              serve  the  timeout value instead of modifying it to reflect the
70              amount of time not slept when interrupted by a  signal  handler.
71              Use when program depends on this behavior.  For more details see
72              the timeout description in  select(2)  manual  page.   Turns  on
73              STICKY_TIMEOUTS.
74
75       -X, --read-implies-exec
76              If  this  is  set  then  mmap(3)  PROT_READ  will  also  add the
77              PROT_EXEC bit - as expected by legacy x86 binaries.  Notice that
78              the  ELF  loader will automatically set this bit when it encoun‐
79              ters a legacy binary.  Turns on READ_IMPLIES_EXEC.
80
81       -Z, --mmap-page-zero
82              SVr4 bug emulation that will set mmap(3) page zero as read-only.
83              Use  when  program depends on this behavior, and the source code
84              is not available to be fixed.  Turns on MMAP_PAGE_ZERO.
85
86       -V, --version
87              Display version information and exit.
88
89       -h, --help
90              Display help text and exit.
91

EXAMPLES

93       setarch ppc32 rpmbuild --target=ppc --rebuild foo.src.rpm
94       setarch ppc32 -v -vL3 rpmbuild --target=ppc --rebuild bar.src.rpm
95       setarch ppc32 --32bit rpmbuild --target=ppc --rebuild foo.src.rpm
96

AUTHOR

98       Elliot Lee ⟨sopwith@redhat.com⟩
99       Jindrich Novy ⟨jnovy@redhat.com⟩
100

SEE ALSO

102       personality(2), select(2)
103

AVAILABILITY

105       The setarch command is part of the util-linux package and is  available
106       from Linux Kernel Archive ⟨https://www.kernel.org/pub/linux/utils/util-
107       linux/⟩.
108
109
110
111util-linux                       December 2017                      SETARCH(8)
Impressum