]>
Commit | Line | Data |
---|---|---|
2b798ecd | 1 | .TH SETARCH 8 "December 2017" "util-linux" "System Administration" |
8b3a46d2 KZ |
2 | .SH NAME |
3 | setarch \- change reported architecture in new program environment and set personality flags | |
4 | .SH SYNOPSIS | |
181ebbb3 | 5 | .B setarch |
c372860d BS |
6 | .I arch |
7 | [options] | |
181ebbb3 | 8 | .RI [ program |
6ad5b22c BS |
9 | .RI [ argument ...]] |
10 | .sp | |
11 | .B arch | |
12 | [options] | |
13 | .RI [ program | |
14 | .RI [ argument ...]] | |
c372860d BS |
15 | .sp |
16 | .B setarch | |
17 | .BR \-\-list | \-h | \-V | |
8b3a46d2 KZ |
18 | .SH DESCRIPTION |
19 | .B setarch | |
c372860d | 20 | currently only affects the output of \fBuname -m\fR. |
6ad5b22c BS |
21 | For example, on an AMD64 system, running \fBsetarch i386 \fIprogram\fR |
22 | will cause \fIprogram\fR to see i686 instead of x86_64 as the machine type. | |
23 | It also allows to set various personality options. | |
24 | The default \fIprogram\fR is \fB/bin/sh\fR. | |
8b3a46d2 KZ |
25 | .SH OPTIONS |
26 | .TP | |
8854b121 BS |
27 | .B \-\-list |
28 | List the architectures that \fBsetarch\fR knows about. Whether \fBsetarch\fR | |
29 | can actually set each of these architectures depends on the running kernel. | |
e0771cf8 | 30 | .TP |
8854b121 BS |
31 | .B \-\-uname\-2.6 |
32 | Causes the \fIprogram\fR to see a kernel version number beginning with 2.6. | |
2b798ecd | 33 | Turns on UNAME26. |
70eebc40 | 34 | .TP |
c372860d BS |
35 | .BR \-v , " \-\-verbose" |
36 | Be verbose. | |
37 | .TP | |
edd82b9c | 38 | \fB\-3\fR, \fB\-\-3gb\fR |
2b798ecd SK |
39 | Specifies |
40 | .I program | |
41 | should use a maximum of 3GB of address space. Supported on x86. Turns on | |
42 | ADDR_LIMIT_3GB. | |
8b3a46d2 | 43 | .TP |
edd82b9c | 44 | \fB\-\-4gb\fR |
2b798ecd SK |
45 | This option has no effect. It is retained for backward compatibility only, |
46 | and may be removed in future releases. | |
edd82b9c KZ |
47 | .TP |
48 | \fB\-B\fR, \fB\-\-32bit\fR | |
2b798ecd SK |
49 | Limit the address space to 32 bits to emulate hardware. Supported on ARM |
50 | and Alpha. Turns on ADDR_LIMIT_32BIT. | |
8b3a46d2 | 51 | .TP |
edd82b9c | 52 | \fB\-F\fR, \fB\-\-fdpic\-funcptrs\fR |
2b798ecd SK |
53 | Treat user-space function pointers to signal handlers as pointers to address |
54 | descriptors. This option has no effect on architectures that do not support | |
55 | FDPIC ELF binaries. In kernel v4.14 support is limited to ARM, Blackfin, | |
56 | Fujitsu FR-V, and SuperH CPU architectures. | |
8b3a46d2 | 57 | .TP |
edd82b9c | 58 | \fB\-I\fR, \fB\-\-short\-inode\fR |
2b798ecd | 59 | Obsolete bug emulation flag. Turns on SHORT_INODE. |
8b3a46d2 | 60 | .TP |
edd82b9c | 61 | \fB\-L\fR, \fB\-\-addr\-compat\-layout\fR |
2b798ecd SK |
62 | Provide legacy virtual address space layout. Use when the |
63 | .I program | |
64 | binary does not have PT_GNU_STACK ELF header. Turns on | |
65 | ADDR_COMPAT_LAYOUT. | |
8b3a46d2 | 66 | .TP |
edd82b9c | 67 | \fB\-R\fR, \fB\-\-addr\-no\-randomize\fR |
2b798ecd SK |
68 | Disables randomization of the virtual address space. Turns on |
69 | ADDR_NO_RANDOMIZE. | |
8b3a46d2 | 70 | .TP |
edd82b9c | 71 | \fB\-S\fR, \fB\-\-whole\-seconds\fR |
2b798ecd | 72 | Obsolete bug emulation flag. Turns on WHOLE_SECONDS. |
8b3a46d2 | 73 | .TP |
edd82b9c | 74 | \fB\-T\fR, \fB\-\-sticky\-timeouts\fR |
2b798ecd SK |
75 | This makes |
76 | .BR select (2), | |
77 | .BR pselect (2), | |
78 | and | |
79 | .BR ppoll (2) | |
80 | system calls preserve the timeout value instead of modifying it to reflect | |
81 | the amount of time not slept when interrupted by a signal handler. Use when | |
82 | .I program | |
83 | depends on this behavior. For more details see the timeout description in | |
84 | .BR select (2) | |
85 | manual page. Turns on STICKY_TIMEOUTS. | |
8b3a46d2 | 86 | .TP |
edd82b9c | 87 | \fB\-X\fR, \fB\-\-read\-implies\-exec\fR |
2b798ecd SK |
88 | If this is set then |
89 | .BR mmap (3) | |
90 | PROT_READ will also add the PROT_EXEC bit - as expected by legacy x86 | |
91 | binaries. Notice that the ELF loader will automatically set this bit when | |
92 | it encounters a legacy binary. Turns on READ_IMPLIES_EXEC. | |
8b3a46d2 | 93 | .TP |
edd82b9c | 94 | \fB\-Z\fR, \fB\-\-mmap\-page\-zero\fR |
2b798ecd SK |
95 | SVr4 bug emulation that will set |
96 | .BR mmap (3) | |
97 | page zero as read-only. Use when | |
98 | .I program | |
99 | depends on this behavior, and the source code is not available to be fixed. | |
8b3a46d2 | 100 | Turns on MMAP_PAGE_ZERO. |
c372860d BS |
101 | .TP |
102 | .BR \-V , " \-\-version" | |
103 | Display version information and exit. | |
104 | .TP | |
105 | .BR \-h , " \-\-help" | |
106 | Display help text and exit. | |
8b3a46d2 KZ |
107 | .SH EXAMPLES |
108 | setarch ppc32 rpmbuild --target=ppc --rebuild foo.src.rpm | |
109 | .br | |
110 | setarch ppc32 -v -vL3 rpmbuild --target=ppc --rebuild bar.src.rpm | |
8df90dec KZ |
111 | .br |
112 | setarch ppc32 --32bit rpmbuild --target=ppc --rebuild foo.src.rpm | |
8b3a46d2 | 113 | .SH AUTHOR |
79f84818 | 114 | .MT sopwith@redhat.com |
e0771cf8 | 115 | Elliot Lee |
79f84818 | 116 | .ME |
8b3a46d2 | 117 | .br |
79f84818 | 118 | .MT jnovy@redhat.com |
e0771cf8 | 119 | Jindrich Novy |
79f84818 | 120 | .ME |
2b798ecd SK |
121 | .SH "SEE ALSO" |
122 | .BR personality (2), | |
123 | .BR select (2) | |
8b3a46d2 | 124 | .SH AVAILABILITY |
601d12fb | 125 | The setarch command is part of the util-linux package and is available from |
d673b74e | 126 | .UR https://\:www.kernel.org\:/pub\:/linux\:/utils\:/util-linux/ |
e0771cf8 SK |
127 | Linux Kernel Archive |
128 | .UE . |