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

NAME

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

SYNOPSIS

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

DESCRIPTION

17       setarch modifies execution domains and process personality flags.
18
19       The execution domains currently only affects the output of uname -m.
20       For example, on an AMD64 system, running setarch i386 program will
21       cause program to see i686 instead of x86_64 as the machine type. It can
22       also be used to set various personality options. The default program is
23       /bin/sh.
24
25       Since version 2.33 the arch command line argument is optional and
26       setarch may be used to change personality flags (ADDR_LIMIT_*,
27       SHORT_INODE, etc) without modification of the execution domain.
28

OPTIONS

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

EXAMPLE

102           setarch --addr-no-randomize mytestprog
103           setarch ppc32 rpmbuild --target=ppc --rebuild foo.src.rpm
104           setarch ppc32 -v -vL3 rpmbuild --target=ppc --rebuild bar.src.rpm
105           setarch ppc32 --32bit rpmbuild --target=ppc --rebuild foo.src.rpm
106

AUTHORS

108       Elliot Lee <sopwith@redhat.com>, Jindrich Novy <jnovy@redhat.com>,
109       Karel Zak <kzak@redhat.com>
110

SEE ALSO

112       personality(2), select(2)
113

REPORTING BUGS

115       For bug reports, use the issue tracker at
116       https://github.com/karelzak/util-linux/issues.
117

AVAILABILITY

119       The setarch command is part of the util-linux package which can be
120       downloaded from Linux Kernel Archive
121       <https://www.kernel.org/pub/linux/utils/util-linux/>.
122
123
124
125util-linux 2.37.2                 2021-07-20                        SETARCH(8)
Impressum