Ibcs Emulation Under Linux
Total Page:16
File Type:pdf, Size:1020Kb
iBCS Emulation Under Linux Overview Explaination of iBCS API and SVr API Kernel internals Native compilation of SCOSVr programs Installati on Shared libraries Troublesho otingtraci ng Limitations Applications known to work Intro duction iBCS emulator allows p eople to run binaries from other i Unix OSs on their Linux machines Supp orted systems include SVR Solaris Interactive Unixware USL Dell etc SVR generic SCO SVR with extensions for symlinks and long lenames Wyse V SVR with extensions for symlinks Xenix V small mo del binaries only Xenix i BSD BSD FreeBSD NetBSD BSDI very alpha Shared libraries are provided to help run binaries for SCO and SVr variants Bo otstrapping the market Misp ercetion that p eople will not sp end money to purchase software for a free OS Size of user base not easy to determine Percieved by some as a hackers OS The iBCS package allows us to Demonstrate that linux communitywants commercial applicati ons Show that p eople will sp end money if the pro duct is go o d Gives leverage for a nativeporttolinux Progress since last year New binutils can b e used to compilelink COFFELF images shared libs mprotect nowworks under linux IPC works b etter Keymaps nowmuch b etter uses loadable keymaps Some supp ort for running BSD binaries nowavailable very ALPHA not iBCS Explaination of iBCS Standard Provides binary compatibility between dierent implementations of Unix Reference implementation is SVr Sp ecication is for application kernel interface SCO is based up on SVr but includes some extensions Ob jectExecutable le format is COFF ISC and Wyse are other implementations based up on SVr Even though this level of the standard is dated if an application is p orted to any Unix variant it will probably b e rst p orted to SCO Explaination of SVr API Backwards compatible with SVr SCO binaries also run Extensions to iBCS are not always compatible with SCO extensions to iBCS emulator must have p ersonality dep endent mappings Ob jectExecutable le format is ELF Shared libraries use runtime dynamic linking elegant and very easy to generate and use SVr ABI sp ecication is for application shared library level SVr API iBCS Application Sh Library Kernel Linux kernel internals for iBCS Program loaders for COFF ELF and xout formats Kernel lcall trap Translate syscall numb ers p ersonality dep endent Translate error signal numb ers Translate arguments structures as required for some syscalls Native Compilation of COFF iBCS binaries New binutils contain supp ort for ELF COFF and aout GCC can easily b e congured to generate COFF assembly les Runtime shared library seems to work for some binaries SVrSCO header les not available Linking libca planned but not ready If your licence p ermits it you can copy libraries and headers from SCO system Native Compilatio n of ELF iBCS binaries Native ELF to ols can b e used to compile and link SVr applications SVr compatible header les not available subset of les in lib c s source tree but not really suitable for applications Runtime shared librarydynamic linker works well for many applica tions Binutils N can b e congured to simultaneously supp ort multiple le formats Under Solaris Sun CC generates debugging stabs which gdb cannot understand Use gcc if you want to b e able to debug something under Linux If your licence p ermits it you can copy libraries and headers from SVr system Do not b other with libnslso from aSVr system it will not work Installation of emulator Currentversion requires or latest N kernel once starts If your system came from a distribution use the version of the emu lator that came with the distribution No kernel patches required iBCS emulator designed to work as a loadable mo dule Can b e unloaded to save memory if not b eing used COFF Shared libraries Version of libc s available works with some binaries No linux version of libnsl s available iBCS sp ecies libX s without jump table this p ortion of stan dard ignored XFree shared libraries available but not compatible with SCO X libraries Many early commercial versions of SVrSCO were buggy most SVrSCO binaries are now static linked ELF Shared libraries Version of libcso available works with many applicati ons Dynamic linker included in libcso Separate version of ldso also available for Solaris binaries TLI based networking not supp orted so cket based networking should work SVrELF shared libraries should be put in usrisysvlib in stead of usrlib Symb olic links are required usrliblibcso usrisysvl ibli bcso usrlibldso usrisysvl ibld so UnixWare X libraries directly call STREAMSTLI instead of so ckets UnixWare X binaries unsuitable to b e used under Linux Troublesho oting Tracing Tracing similar to truss available can be used to debug emulator and applicati ons Some applications do not install cleanly list of known problems is shipp ed with emulator source co de Precompiled libraries are stripp ed of debugging information you can build the libraries yourself to debug library problems gdb Get the le publinuxpackagesGCCgdbbintargz Has the fol lowing capability gdb break main Breakpoint at xb file helloc line gdb run Starting program usruserserichell o Breakpoint main at helloc gdb info shared From To Syms Read Shared Object Library x xbc Yes libelflibcso x x Yes libelfldlinux so gdb break printf Breakpoint at xd gdb cont Continuing Breakpoint xd in IOprintf gdb Limitations Applications that require STREAMS TLI networking will fail So ck ets OK SVr shared libraries may b e missing entry p oints proc lesystem not emulated How to help the pro ject SVr libraries need more testing and work Binutils for nativeELF can b e used to compile libraries with debugging Easiest to get the lib cso source tree and compile with debugging If application was built with debugging you can debug both applica tionlibrary as if it were one large application Trace tells you which syscalls were made and what the results were To add a missing API function lib cli nux may already have suitable sources for the missing function Mo dify Makele to add new le to source list Rebuild library function is automatically incorp orated Send me the patches Supp ort for STREAMS would be nice at some point kernel itself needs to supp ort this rst Applications known to work Partial list WordPerfect b oth character based and X based Oracle database manager Informix relational database management system Xess X based spreadsheet SCO app built under Linux CorelDraw Drawingpaint program ZMail GUI based mail program Copyright issues Information for developmentofemulator and libraries obtained from Bo oks on iBCS SVr API etc man pages Manuals Header les Behavoir of existing programs under Linux Drafts of ABI standard None of the develop ers has ever had access to anycontrolled Unix sources Contributors Al Longyear COFF loader emulator lib c s Mike Jagdis xout loader emulator Wyse and BSD supp ort Jo e Portman emulator development lib c s Phillip Balister emulator COFF gdb Drew Sullivan Source tree maintainer Karl Kiniger Interactive supp ort Eric Youngdale ELF loader v of emulator lib c s Conclusions Nativeversions of applications will always b e preferred lower mem ory comsumption Supp ort more likely with nativeversion Success of SCOSVr version under linux may convince vendors to do a native p ort to b etter supp ort the users Many commercial applicati ons will never b e p orted for various rea sons running SCOSVr binaries under Linux works fairly well.