215 lines
5.7 KiB
HTML
215 lines
5.7 KiB
HTML
|
|
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|
<HTML><HEAD><TITLE>Man page of SETARCH</TITLE>
|
|
</HEAD><BODY>
|
|
<H1>SETARCH</H1>
|
|
Section: System Administration (8)<BR>Updated: December 2017<BR><A HREF="#index">Index</A>
|
|
<A HREF="/cgi-bin/man/man2html">Return to Main Contents</A><HR>
|
|
|
|
<A NAME="lbAB"> </A>
|
|
<H2>NAME</H2>
|
|
|
|
setarch - change reported architecture in new program environment and/or set personality flags
|
|
<A NAME="lbAC"> </A>
|
|
<H2>SYNOPSIS</H2>
|
|
|
|
<B>setarch</B>
|
|
|
|
[<I>arch</I>]
|
|
|
|
[options]
|
|
[<I>program</I>
|
|
|
|
[<I>argument</I>...]]
|
|
|
|
<P>
|
|
<B>setarch</B>
|
|
|
|
<B>--list</B>|<B>-h</B>|<B>-V</B>
|
|
|
|
<P>
|
|
<B>arch</B>
|
|
|
|
[options]
|
|
[<I>program</I>
|
|
|
|
[<I>argument</I>...]]
|
|
|
|
<A NAME="lbAD"> </A>
|
|
<H2>DESCRIPTION</H2>
|
|
|
|
<B>setarch</B>
|
|
|
|
modifies execution domains and process personality flags.
|
|
<P>
|
|
|
|
The execution domains currently only affects the output of <B>uname -m</B>.
|
|
For example, on an AMD64 system, running <B>setarch i386 </B><I>program</I>
|
|
will cause <I>program</I> to see i686 instead of x86_64 as the machine type.
|
|
It also allows to set various personality options.
|
|
The default <I>program</I> is <B>/bin/sh</B>.
|
|
<P>
|
|
|
|
Since version 2.33 the
|
|
<I>arch</I>
|
|
|
|
command line argument is optional and
|
|
<B>setarch</B>
|
|
|
|
may be used to change personality flags (ADDR_LIMIT_*, SHORT_INODE, etc) without
|
|
modification of the execution domain.
|
|
<A NAME="lbAE"> </A>
|
|
<H2>OPTIONS</H2>
|
|
|
|
<DL COMPACT>
|
|
<DT id="1"><B>--list</B>
|
|
|
|
<DD>
|
|
List the architectures that <B>setarch</B> knows about. Whether <B>setarch</B>
|
|
can actually set each of these architectures depends on the running kernel.
|
|
<DT id="2"><B>--uname-2.6</B>
|
|
|
|
<DD>
|
|
Causes the <I>program</I> to see a kernel version number beginning with 2.6.
|
|
Turns on UNAME26.
|
|
<DT id="3"><B>-v</B>,<B> --verbose</B>
|
|
|
|
<DD>
|
|
Be verbose.
|
|
<DT id="4"><B>-3</B>, <B>--3gb</B><DD>
|
|
Specifies
|
|
<I>program</I>
|
|
|
|
should use a maximum of 3GB of address space. Supported on x86. Turns on
|
|
ADDR_LIMIT_3GB.
|
|
<DT id="5"><B>--4gb</B><DD>
|
|
This option has no effect. It is retained for backward compatibility only,
|
|
and may be removed in future releases.
|
|
<DT id="6"><B>-B</B>, <B>--32bit</B><DD>
|
|
Limit the address space to 32 bits to emulate hardware. Supported on ARM
|
|
and Alpha. Turns on ADDR_LIMIT_32BIT.
|
|
<DT id="7"><B>-F</B>, <B>--fdpic-funcptrs</B><DD>
|
|
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.
|
|
<DT id="8"><B>-I</B>, <B>--short-inode</B><DD>
|
|
Obsolete bug emulation flag. Turns on SHORT_INODE.
|
|
<DT id="9"><B>-L</B>, <B>--addr-compat-layout</B><DD>
|
|
Provide legacy virtual address space layout. Use when the
|
|
<I>program</I>
|
|
|
|
binary does not have PT_GNU_STACK ELF header. Turns on
|
|
ADDR_COMPAT_LAYOUT.
|
|
<DT id="10"><B>-R</B>, <B>--addr-no-randomize</B><DD>
|
|
Disables randomization of the virtual address space. Turns on
|
|
ADDR_NO_RANDOMIZE.
|
|
<DT id="11"><B>-S</B>, <B>--whole-seconds</B><DD>
|
|
Obsolete bug emulation flag. Turns on WHOLE_SECONDS.
|
|
<DT id="12"><B>-T</B>, <B>--sticky-timeouts</B><DD>
|
|
This makes
|
|
<B><A HREF="/cgi-bin/man/man2html?2+select">select</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+pselect">pselect</A></B>(2),
|
|
|
|
and
|
|
<B><A HREF="/cgi-bin/man/man2html?2+ppoll">ppoll</A></B>(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
|
|
<I>program</I>
|
|
|
|
depends on this behavior. For more details see the timeout description in
|
|
<B><A HREF="/cgi-bin/man/man2html?2+select">select</A></B>(2)
|
|
|
|
manual page. Turns on STICKY_TIMEOUTS.
|
|
<DT id="13"><B>-X</B>, <B>--read-implies-exec</B><DD>
|
|
If this is set then
|
|
<B><A HREF="/cgi-bin/man/man2html?3+mmap">mmap</A></B>(3)
|
|
|
|
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.
|
|
<DT id="14"><B>-Z</B>, <B>--mmap-page-zero</B><DD>
|
|
SVr4 bug emulation that will set
|
|
<B><A HREF="/cgi-bin/man/man2html?3+mmap">mmap</A></B>(3)
|
|
|
|
page zero as read-only. Use when
|
|
<I>program</I>
|
|
|
|
depends on this behavior, and the source code is not available to be fixed.
|
|
Turns on MMAP_PAGE_ZERO.
|
|
<DT id="15"><B>-V</B>,<B> --version</B>
|
|
|
|
<DD>
|
|
Display version information and exit.
|
|
<DT id="16"><B>-h</B>,<B> --help</B>
|
|
|
|
<DD>
|
|
Display help text and exit.
|
|
</DL>
|
|
<A NAME="lbAF"> </A>
|
|
<H2>EXAMPLES</H2>
|
|
|
|
setarch --addr-no-randomize mytestprog
|
|
<BR>
|
|
|
|
setarch ppc32 rpmbuild --target=ppc --rebuild foo.src.rpm
|
|
<BR>
|
|
|
|
setarch ppc32 -v -vL3 rpmbuild --target=ppc --rebuild bar.src.rpm
|
|
<BR>
|
|
|
|
setarch ppc32 --32bit rpmbuild --target=ppc --rebuild foo.src.rpm
|
|
<A NAME="lbAG"> </A>
|
|
<H2>AUTHOR</H2>
|
|
|
|
|
|
Elliot Lee
|
|
|
|
<BR>
|
|
|
|
|
|
Jindrich Novy
|
|
|
|
<BR>
|
|
|
|
|
|
Karel Zak
|
|
|
|
<A NAME="lbAH"> </A>
|
|
<H2>SEE ALSO</H2>
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+personality">personality</A></B>(2),
|
|
|
|
<B><A HREF="/cgi-bin/man/man2html?2+select">select</A></B>(2)
|
|
|
|
<A NAME="lbAI"> </A>
|
|
<H2>AVAILABILITY</H2>
|
|
|
|
The setarch command is part of the util-linux package and is available from
|
|
|
|
Linux Kernel Archive
|
|
|
|
<P>
|
|
|
|
<HR>
|
|
<A NAME="index"> </A><H2>Index</H2>
|
|
<DL>
|
|
<DT id="17"><A HREF="#lbAB">NAME</A><DD>
|
|
<DT id="18"><A HREF="#lbAC">SYNOPSIS</A><DD>
|
|
<DT id="19"><A HREF="#lbAD">DESCRIPTION</A><DD>
|
|
<DT id="20"><A HREF="#lbAE">OPTIONS</A><DD>
|
|
<DT id="21"><A HREF="#lbAF">EXAMPLES</A><DD>
|
|
<DT id="22"><A HREF="#lbAG">AUTHOR</A><DD>
|
|
<DT id="23"><A HREF="#lbAH">SEE ALSO</A><DD>
|
|
<DT id="24"><A HREF="#lbAI">AVAILABILITY</A><DD>
|
|
</DL>
|
|
<HR>
|
|
This document was created by
|
|
<A HREF="/cgi-bin/man/man2html">man2html</A>,
|
|
using the manual pages.<BR>
|
|
Time: 00:06:16 GMT, March 31, 2021
|
|
</BODY>
|
|
</HTML>
|