glenda.party
term% ls -F
term% pwd
$home/manuals/9front/1/5e
term% cat index.txt
5E(1)                       General Commands Manual                      5E(1)



NAME
       5e - user-mode ARM emulation

SYNOPSIS
       5e [ -npb ] text [ arguments ]

DESCRIPTION
       5e  simulates  the  execution of an ARM binary in a Plan 9 environment.
       Unlike its predecessor vi(1) it supports, among  others,  the  syscalls
       rfork  (see  fork(2))  and  exec(2),  which allows for the execution of
       threaded programs (e.g., rio(1) or catclock(1)).

       5e executes the specified binary text, which is prepended by /bin if it
       does not begin with a slash, dot or hash sign.  Unless -n is specified,
       /bin is replaced by the union of /arm/bin and /rc/bin.

       Unlike vi(1), 5e(1) does not provide built-in debugging facilities.  It
       does provide emulation of the /proc directory, if the -p flag is speci‐
       fied, to attach a proper debugger like acid(1).  There is no equivalent
       of the profiling facilities, no caches or TLBs are simulated, either.

       5e(1) currently has three options.

       -n     By default, 5e(1) replaces /bin as mentioned above and also sets
              the variables cputype and objtype to arm.  Supplying the -n  op‐
              tion suppresses this behaviour.

       -p     The  -p option activates emulation of a /proc file system, which
              is mounted  at  /proc  and  also  posted  as  /srv/armproc,  cf.
              srv(3).

       -b     Supplying  -b  causes failing processes to call abort(2) instead
              of sysfatal.  See below.

SOURCE
       /sys/src/cmd/5e

SEE ALSO
       vi(1)

BUGS
       The host is required to be little endian  and  is  assumed  to  have  a
       floating point implementation conforming to IEEE 754.

       Broken  processes are simulated in a rather unsatisfactory manner.  The
       -b option leaks memory.  The emulator does not post sys: notes.

       Obscure opcodes, in particular uncommon operations on R15, are not  im‐
       plemented.   Careless  use of the LDREX and STREX instructions can lead
       to deadlock, while the ARM Architecture Reference  Manual  indicates  a
       real processor will exhibit undefined behavior in these cases.

       Accesses  spanning  segment  boundaries will be treated as page faults.
       Many syscalls such as pread(2) will shuffle data around (in most  cases
       unnecessarily)  if  invoked  on potentially shared segments of variable
       length, in particular the bss segment.

       FPA emulation leaves much to be desired, rounding  modes  are  ignored,
       all  calculations  are performed at extended precision.  Floating point
       exceptions crash the emulator.

       Several syscalls, most notably the segattach(2) family, are not  imple‐
       mented  (this should not be hard to fix).  The emulator notes the value
       of errstr(2) only under obvious circumstances; with most syscalls  only
       if the return value is negative.

       /proc emulation is more than unsatisfactory.

       The  text  argument should behave more like it would if it had been en‐
       tered as an argument to rc(1).

HISTORY
       5e first appeared in 9front (June, 2011).



                                                                         5E(1)