]>
Commit | Line | Data |
---|---|---|
295b3979 | 1 | //po4a: entry man manual |
b9d2ddfb MB |
2 | = setarch(8) |
3 | :doctype: manpage | |
4 | :man manual: System Administration | |
5 | :man source: util-linux {release-version} | |
6 | :page-layout: base | |
7 | :command: setarch | |
8 | ||
9 | == NAME | |
10 | ||
11 | setarch - change reported architecture in new program environment and/or set personality flags | |
12 | ||
13 | == SYNOPSIS | |
14 | ||
89456be7 | 15 | *setarch* [_arch_] [options] [_program_ [_argument_...]] |
b9d2ddfb MB |
16 | |
17 | *setarch* *--list*|*-h*|*-V* | |
18 | ||
4d297435 | 19 | *arch* [options] [_program_ [_argument_...]] |
b9d2ddfb MB |
20 | |
21 | == DESCRIPTION | |
22 | ||
23 | *setarch* modifies execution domains and process personality flags. | |
24 | ||
25 | The execution domains currently only affects the output of *uname -m*. For example, on an AMD64 system, running *setarch i386* _program_ will cause _program_ to see i686 instead of _x86_64_ as the machine type. It can also be used to set various personality options. The default _program_ is */bin/sh*. | |
26 | ||
27 | Since version 2.33 the _arch_ command line argument is optional and *setarch* may be used to change personality flags (ADDR_LIMIT_*, SHORT_INODE, etc) without modification of the execution domain. | |
28 | ||
29 | == OPTIONS | |
30 | ||
31 | *--list*:: | |
4eab78d3 | 32 | List the architectures that *setarch* knows about. Whether *setarch* can actually set each of these architectures depends on the running kernel. |
b9d2ddfb | 33 | |
03a254f0 TW |
34 | *--show[=personality]*:: |
35 | Show the currently active personality and flags. | |
36 | If the *personality* argument is provided, it is shown instead of the current one. | |
1a8f5c67 | 37 | *personality* is a hexadecimal number with values was described in *sys/personality.h*. |
03a254f0 | 38 | |
b9d2ddfb | 39 | *--uname-2.6*:: |
4eab78d3 | 40 | Causes the _program_ to see a kernel version number beginning with 2.6. Turns on *UNAME26*. |
b9d2ddfb MB |
41 | |
42 | *-v*, *--verbose*:: | |
4eab78d3 | 43 | Be verbose. |
b9d2ddfb MB |
44 | |
45 | *-3*, *--3gb*:: | |
4eab78d3 | 46 | Specifies _program_ should use a maximum of 3GB of address space. Supported on x86. Turns on *ADDR_LIMIT_3GB*. |
b9d2ddfb MB |
47 | |
48 | *--4gb*:: | |
4eab78d3 | 49 | This option has no effect. It is retained for backward compatibility only, and may be removed in future releases. |
b9d2ddfb MB |
50 | |
51 | *-B*, *--32bit*:: | |
4eab78d3 | 52 | Limit the address space to 32 bits to emulate hardware. Supported on ARM and Alpha. Turns on *ADDR_LIMIT_32BIT*. |
b9d2ddfb MB |
53 | |
54 | *-F*, *--fdpic-funcptrs*:: | |
4eab78d3 | 55 | Treat user-space function pointers to signal handlers as pointers to address descriptors. This option has no effect on architectures that do not support *FDPIC* ELF binaries. In kernel v4.14 support is limited to ARM, Blackfin, Fujitsu FR-V, and SuperH CPU architectures. |
b9d2ddfb MB |
56 | |
57 | *-I*, *--short-inode*:: | |
4eab78d3 | 58 | Obsolete bug emulation flag. Turns on *SHORT_INODE*. |
b9d2ddfb MB |
59 | |
60 | *-L*, *--addr-compat-layout*:: | |
4eab78d3 | 61 | Provide legacy virtual address space layout. Use when the _program_ binary does not have *PT_GNU_STACK* ELF header. Turns on *ADDR_COMPAT_LAYOUT*. |
b9d2ddfb MB |
62 | |
63 | *-R*, *--addr-no-randomize*:: | |
4eab78d3 | 64 | Disables randomization of the virtual address space. Turns on *ADDR_NO_RANDOMIZE*. |
b9d2ddfb MB |
65 | |
66 | *-S*, *--whole-seconds*:: | |
4eab78d3 | 67 | Obsolete bug emulation flag. Turns on *WHOLE_SECONDS*. |
b9d2ddfb MB |
68 | |
69 | *-T*, *--sticky-timeouts*:: | |
4eab78d3 | 70 | This makes *select*(2), *pselect*(2), and *ppoll*(2) system calls preserve the timeout value instead of modifying it to reflect the amount of time not slept when interrupted by a signal handler. Use when _program_ depends on this behavior. For more details see the timeout description in *select*(2) manual page. Turns on *STICKY_TIMEOUTS*. |
b9d2ddfb MB |
71 | |
72 | *-X*, *--read-implies-exec*:: | |
7de3f50e | 73 | If this is set then *mmap*(2) *PROT_READ* will also add the *PROT_EXEC* bit - as expected by legacy x86 binaries. Notice that the ELF loader will automatically set this bit when it encounters a legacy binary. Turns on *READ_IMPLIES_EXEC*. |
b9d2ddfb MB |
74 | |
75 | *-Z*, *--mmap-page-zero*:: | |
7de3f50e | 76 | SVr4 bug emulation that will set *mmap*(2) page zero as read-only. Use when _program_ depends on this behavior, and the source code is not available to be fixed. Turns on *MMAP_PAGE_ZERO*. |
b9d2ddfb | 77 | |
2b2d3172 | 78 | include::man-common/help-version.adoc[] |
b9d2ddfb MB |
79 | |
80 | == EXAMPLE | |
81 | ||
82 | .... | |
83 | setarch --addr-no-randomize mytestprog | |
84 | setarch ppc32 rpmbuild --target=ppc --rebuild foo.src.rpm | |
85 | setarch ppc32 -v -vL3 rpmbuild --target=ppc --rebuild bar.src.rpm | |
86 | setarch ppc32 --32bit rpmbuild --target=ppc --rebuild foo.src.rpm | |
87 | .... | |
88 | ||
89 | == AUTHORS | |
90 | ||
4eab78d3 MB |
91 | mailto:sopwith@redhat.com[Elliot Lee], |
92 | mailto:jnovy@redhat.com[Jindrich Novy], | |
b9d2ddfb MB |
93 | mailto:kzak@redhat.com[Karel Zak] |
94 | ||
95 | == SEE ALSO | |
96 | ||
97 | *personality*(2), | |
98 | *select*(2) | |
99 | ||
625e9c61 | 100 | include::man-common/bugreports.adoc[] |
b9d2ddfb | 101 | |
625e9c61 | 102 | include::man-common/footer.adoc[] |
b9d2ddfb MB |
103 | |
104 | ifdef::translation[] | |
625e9c61 | 105 | include::man-common/translation.adoc[] |
b9d2ddfb | 106 | endif::[] |