+Linux Emulation for SCOK

Ronald Joe Record (rr@sco.com), SCO\  Michael Hopkirk (hops@sco.com), SCO\  Steve Ginzburg (steven@ugcs.caltech.edu), California Institute of Technology
 May 8, 1998

This paper describes some of the rationale and implementation decisions for lxrun, an Intel Linux emulator, plus how to get, build, configure and run it; what some of the current and future development issues and enhancements are and the current status of the project. There is not much difference between the execution environment required by Linux binaries and binaries for other Intel UNIX platforms, the main one being the way in which system calls are handled. For example, in Linux an "int $0x80" instruction is used, which jumps to the system-call-handling portion of the Linux kernel. On SCO systems, "int $0x80" is an unused vector and therefore causes a general protection trap resulting in a SIGSEGV signal. Lxrun intercepts these signals and calls the SCO equivalent of the system call that the Linux program attempted. It also remaps some ioctls, flags, return values and error codes. Using lxrun, a Linux binary can be run on a non-Linux platform with little performance penalty. Lxrun can also take advantage of the lower overhead in some Linux libraries, occasionally resulting in improved performance over native binaries. No kernel modifications are necessary.

· 1 Introduction
· 1.1 What is lxrun ?
· 1.2 Why should I use lxrun ?
· 2 Implementation
· 2.1 Design goals
· 2.2 Difference in syscall handling
· 2.3 Pathname for loading Linux libraries 
· 2.4 Device major number mappings
· 2.5 Differences in kernel tty systems
· 2.6 Miscellaneous issues
· 3 Development Issues
· 3.1 Direct execution of Linux ELF binaries
· 3.2 SIGSEGV vs. software interrupt kernel module
· 3.3 Performance enhancements
· 4 System Call Mapping
· 4.1 Directly mapped system calls
· 4.2 System calls with a non-stub emulation function
· 4.3 Partial implementations
· 4.4 Unimplemented system calls
· 5 Getting started
· 5.1 How do I get lxrun ?
· 5.2 Building lxrun from source
· 5.3 Installing the emulation system
· 5.4 Installing Linux applications
· 5.5 Error messages
· 5.6 If you come across an unsupported binary
· 6 Web Presence
· 7 Authors and Contributors
· 8 About This Document