The binary compatibility packages are invoked automatically and transparently when running a SunOS 4.x application. You do not need to alter your application.
All Solaris 2.x releases support SunOS 4.x dynamically linked executables. From Solaris 2.3 onwards, statically linked executables can also be run. From Solaris 2.5 onward mixed static and dynamically linked executables are supported.
Some of the many differences between the SunOS 4.x and Solaris 2.x releases involve the location of commands and other interfaces. Because of these differences, the definition of your PATH environment variable affects how your applications run with the binary compatibility packages. The following section explains this in detail.
There are two problems in resolving path names. First, an object may reside in a different place in this release than it did in the SunOS 4.x release. For example, a command found in /usr/bin in the SunOS 4.x release may be in /usr/ucb in the Solaris 2.x release. The Source Compatibility Package resolves this difference by setting up symbolic links whenever possible so that the applications, using the old path names, can access the files.
Second, many commands in this release are not compatible with their SunOS 4.x counterparts. As part of the Source Compatibility Package, a set of SunOS 4.x-compatible command binaries is also installed. If applications specify only the command name to be executed (and not a path name), the Binary Compatibility Package reads the PATH environment variable to find the correct command. For this reason the PATH variable should be set correctly before running the application.
For example, to get the default SunOS 4.x behavior, specify /usr/ucb before /usr/bin in PATH; otherwise, the default Solaris 2.x behavior is provided.
When a full path name is given, the Binary Compatibility Package interprets the path name as given. When the path begins with /usr/5bin, the default Solaris 2.x version of the command is executed; otherwise, the Source Compatibility Package version is executed. A relative path name is interpreted as given.
Starting in Solaris 2.5, five commands are relocated from /usr/ucb to /usr/bin to accommodate shell scripts written with absolute paths. These commands are arch(1), hostid(1)), hostname(1), mach(1), and pagesize(1)).
Running SunOS 4.x binaries using the binary compatibility packages requires more memory than running the same binaries under SunOS 4.x, or than running the same application after it has been ported to Solaris 2.x. Similarly, it requires more disk storage space and disk accesses. Using the binary compatibility packages will reduce the performance of the application and of the overall system.