United States |
|
|
When fpx finds the untranslated libraries, it translates them and names them according to the following convention: libname.so.major.minor.fpx.so where: name, major, and minor fields correspond to the original libraries.
|
libname | The name of the library (libdl, for example) without any version numbers. This format instructs fpx to link the translated executable against the same version of the library that the orginal executable was linked against. |
libnameso.x | The library name followed by the major version number, x, and the minor version number, y. This format instructs fpx to link the translated executable against the exact library version specified. |
Examples:
% fpx -o xaccount.alpha account.exe libc libdl
This command instructs fpx to translate account.exe, to name the translated version xaccount.alpha, and to link xaccount.alpha against the same libc and libdl libraries that account.exe was linked against on the SunOS system.
% fpx -o xaccount.alpha account.exe libc.so.1.7
This command instructs fpx to translate account.exe, to name the translated version xaccount.alpha, and to link xaccount.alpha against the library libc.so.1.7.
If the fpx command issues error messages, refer to Chapter 3, Debugging a translation, for information about debugging the problems. Appendix A, fpx command messages, provides a complete alphabetical listing of fpx messages and suggested user actions.
fpx supports the following environment variable:
The fpx command accepts general use options and debugging and performance options . In most cases, you only need the general options. Use the remaining options to debug a translated executable or to achieve specific results.
The general use options are
-help | Display a summary of fpx command syntax and options. |
-l [filename] | Put listing file in filename (the default is executable.lis). |
-nohifs | Prevent .hif files from being generated even if the environment variable FPXR_GENERATE_FEEDBACK is set at run time. See Chapter 4, Enhancing performance. |
-o outfile | Put translated executable in outfile
(the default is a.out ). |
-v | Display informational and warning messages in addition to error and fatal messages. If you omit the -v option, fpx prints only error and fatal messages. |
-V | Print the version of FreePort Express. |
-w | Suppress warning messages. |
-c | Translate the input executable but do not link it with its translated shared libraries. |
-F | Generate conservative (slower) floating-point optimizations when there are alignment errors. See Correcting unaligned double-precision floating-point numbers in Chapter 4 |
-fixround | Generate a code sequence that affects floating-point rounding mode at run time so that each instance of floating-point rounding to RM (minus infinity) is changed so it rounds to RZ (zero). This may cause a slight loss of precision, but may substantially improve the run-time performance of the translated executable. |
-full_fp | Translate all SPARC floating-point computations to completion-safe floating-point code on Alpha. Use when an executable runs without problems on SunOS but generates SIGFPEs at run time when translated to Alpha. Slows performance but enables executable to run correctly. See Correcting for nonfinite numbers and SIGFPEs in Chapter 4 for further explanation. |
-opt_lita | Optimize the translation for a minimum number of entries in the .lita section of the Digital UNIX object file. Using this switch lowers the translated executables performance -- use it only if translation generates the message Too many address literals, link will fail. Please retranslate with -opt_lita. |
-m | Generate a machine code listing for the input executable and its translated output. Useful when debugging with the dbx debugging tool. If a file name for the listing is not specified using the -l option, then a listing is created by default in the file executable.lis. |
-M [filename] | Generate and keep a makefile (the default is makefile). fpx generates a makefile to direct the translation of the executable and shared libraries. Use this option to retain a copy of the makefile. |
-O | Perform peephole optimizations and Alpha instruction scheduling |
-O0 | Do not perform optimizations. |
-O1 | Perform peephole optimizations. |
-O2 | Perform peephole optimizations and Alpha instruction scheduling. Identical to -O. |
Running the translated executable
To run the executable after translation, follow these steps:
1 | Make sure that the translated executable, shared libraries, and any other supporting files are available on the Digital UNIX system. If you have not already done so, rename the translated executable so it uses the same file name it used on the SunOS system. For example, rename hello.alpha to hello. |
2 | Set the LD_BIND_NOW environment variable to 1. |
3 | Use the LD_LIBRARY_PATH variable to
identify the location of translated libraries if you copy them to nondefault locations.
Otherwise, fpxr searches the following default system directories: /usr/shlib /usr/lib /usr/local/lib /var/shlib |
4 | Set whichever environment variables, listed in Options for the run-time environment, are appropriate for your needs |
5 | Invoke the translated executable by using the same command used to invoke it on the SunOS system. The executable invokes fpxr automatically. |
6 | The executable performs the equivalent functions performed on the SunOS SPARC system |
For example:
% mv a.out
hello
hello
- its original name on the SunOS SPARC system. % setenv
LD_BIND_NOW 1
% setenv
LD_LIBRARY_PATH /usr/xshlib
% setenv FPXR_LOGFILE
hello.log
hello.log
. % hello
hello,
world!
When you run a translated executable, fpxr may need to interpret SPARC code that fpx was not able to detect at the previous translation. If you set the environment variable FPXR_GENERATE_FEEDBACK at run time, fpxr records information about the interpreted code to a feedback file. When you subsequently retranslate the original executable, fpx uses the feedback information to locate and translate the code. The next time you run the translated executable, its performance should improve because translated code is more efficient than interpreted code. See Chapter 4, Enhancing performance, for further information on run-time feedback.
If fpxr displays error messages, refer to Appendix B, fpxr Run-time messages, for a complete alphabetical listing of fpxr messages and suggested user actions. Refer to Chapter 3, Debugging a translation, for debugging suggestions. If the executable runs, but slowly, refer to Chapter 3, Debugging a translation, and Chapter 4, Enhancing performance, for instructions on improving performance.
The fpxr environment modifies its behavior if you set any of the following environment variables before running a translated executable:
FPXR_GENERATE_ FEEDBACK |
Generate a .hif file to use as feedback for a subsequent retranslation. This variable is ignored if the executable was translated with the -nohifs option. See Chapter 4, Enhancing performance, for information on feedback files | ||||||||||||||
FPXR_LOGFILE logfile_name | Redirect all fpxr output to the specified file. This is especially useful when combined with other debugging options in environments where the terminal output needs to be undisturbed, for example, screen-based editors. | ||||||||||||||
FPXR_QUIET | Suppress all output related to the fpxr environment except for fatal errors. | ||||||||||||||
FPXR_STATS_ DISPLAY |
Display run-time statistics when the executable exits. These statistics provide a snapshot of how fpxr supports the executable. | ||||||||||||||
FPXR_TRACE_ SIGNALS |
Trace all signals and signal system calls. | ||||||||||||||
FPXR_TRACE_ SYSCALLS [call[call,...]] |
Trace system calls. If no system calls
are specified, all system calls are traced. If any system calls are specified or if the
word all appears in the list, only those specified are traced. To prevent
tracing a specific system call, begin the name with a hyphen. Separate the names of system
calls with commas (,). For example, to trace several calls, enter the following: %
FPXR_TRACE_SYSCALLS To trace all system calls except read and write, enter the following: %
FPXR_TRACE_SYSCALLS If you are using either the ksh or sh shell, use the following format: FPXR_TRACE_SYSCALLS=call,call
|
||||||||||||||
FPXR_VERBOSE n | Print detailed information about fpxr
processing. If you are using either the ksh or sh shell, use the following format: FPXR_VERBOSE=n
The possible values for n and associated results are as follows:
|
||||||||||||||
FPXR_XTERM | Redirect fpxr input/output through an xterm window. Useful with FPXR_VERBOSE or FPXR_TRACE_xxx variables. |
You can enter the following commands at the shell prompt to obtain information about fpxr itself:
fpxr -help | Display a summary of fpxr environment variables. |
fpxr -V | Print the version of the fpx command. |
Translation does not change the user interface for the executable. You can supply any arguments to the translated executable that are used with the SunOS SPARC version of the executable.
If you have questions about FreePort Express, send email to fpx-info@scrugs.lkg.dec.com.
Click to send feedback |