1 .TH SETARCH 8 "December 2017" "util-linux" "System Administration"
3 setarch \- change reported architecture in new program environment and/or set personality flags
12 .BR \-\-list | \-h | \-V
20 modifies execution domains and process personality flags.
22 The execution domains currently only affects the output of \fBuname \-m\fR.
23 For example, on an AMD64 system, running \fBsetarch i386 \fIprogram\fR
24 will cause \fIprogram\fR to see i686 instead of x86_64 as the machine type.
25 It also allows to set various personality options.
26 The default \fIprogram\fR is \fB/bin/sh\fR.
28 Since version 2.33 the
30 command line argument is optional and
32 may be used to change personality flags (ADDR_LIMIT_*, SHORT_INODE, etc) without
33 modification of the execution domain.
37 List the architectures that \fBsetarch\fR knows about. Whether \fBsetarch\fR
38 can actually set each of these architectures depends on the running kernel.
41 Causes the \fIprogram\fR to see a kernel version number beginning with 2.6.
44 .BR \-v , " \-\-verbose"
47 \fB\-3\fR, \fB\-\-3gb\fR
50 should use a maximum of 3GB of address space. Supported on x86. Turns on
54 This option has no effect. It is retained for backward compatibility only,
55 and may be removed in future releases.
57 \fB\-B\fR, \fB\-\-32bit\fR
58 Limit the address space to 32 bits to emulate hardware. Supported on ARM
59 and Alpha. Turns on ADDR_LIMIT_32BIT.
61 \fB\-F\fR, \fB\-\-fdpic\-funcptrs\fR
62 Treat user-space function pointers to signal handlers as pointers to address
63 descriptors. This option has no effect on architectures that do not support
64 FDPIC ELF binaries. In kernel v4.14 support is limited to ARM, Blackfin,
65 Fujitsu FR-V, and SuperH CPU architectures.
67 \fB\-I\fR, \fB\-\-short\-inode\fR
68 Obsolete bug emulation flag. Turns on SHORT_INODE.
70 \fB\-L\fR, \fB\-\-addr\-compat\-layout\fR
71 Provide legacy virtual address space layout. Use when the
73 binary does not have PT_GNU_STACK ELF header. Turns on
76 \fB\-R\fR, \fB\-\-addr\-no\-randomize\fR
77 Disables randomization of the virtual address space. Turns on
80 \fB\-S\fR, \fB\-\-whole\-seconds\fR
81 Obsolete bug emulation flag. Turns on WHOLE_SECONDS.
83 \fB\-T\fR, \fB\-\-sticky\-timeouts\fR
89 system calls preserve the timeout value instead of modifying it to reflect
90 the amount of time not slept when interrupted by a signal handler. Use when
92 depends on this behavior. For more details see the timeout description in
94 manual page. Turns on STICKY_TIMEOUTS.
96 \fB\-X\fR, \fB\-\-read\-implies\-exec\fR
99 PROT_READ will also add the PROT_EXEC bit - as expected by legacy x86
100 binaries. Notice that the ELF loader will automatically set this bit when
101 it encounters a legacy binary. Turns on READ_IMPLIES_EXEC.
103 \fB\-Z\fR, \fB\-\-mmap\-page\-zero\fR
104 SVr4 bug emulation that will set
106 page zero as read-only. Use when
108 depends on this behavior, and the source code is not available to be fixed.
109 Turns on MMAP_PAGE_ZERO.
111 .BR \-V , " \-\-version"
112 Display version information and exit.
114 .BR \-h , " \-\-help"
115 Display help text and exit.
117 setarch \-\-addr-no-randomize mytestprog
119 setarch ppc32 rpmbuild \-\-target=ppc \-\-rebuild foo.src.rpm
121 setarch ppc32 \-v \-vL3 rpmbuild \-\-target=ppc \-\-rebuild bar.src.rpm
123 setarch ppc32 \-\-32bit rpmbuild \-\-target=ppc \-\-rebuild foo.src.rpm
125 .MT sopwith@redhat.com
140 The setarch command is part of the util-linux package and is available from
141 .UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/