moving from COFF to ELF with the help of coffcheck
Follows is the article describing how to use the coffcheck script in this
directory to help you move from the irix 4 COFF world
of machine-readable binary files to the commensurate
IRIX 5 ELF world.
Preparing to Upgrade to IRIX 6.2
By Anatole Gordon, Developer Technical Program
With three exceptions, IRIXTM 6.2 is an upwardly compatible revision of
IRIX 5 and IRIX 6 that we intend to release in early 1996. This release
of IRIX provides the same functionality on systems that run in either
32- or 64-bit mode.* IRIX 6.2 supports applications designed for IRIX
5.0 through IRIX 6.1. However, as is the case with 6.1, the three
exceptions to the upward compatibility of IRIX 6.2 are as follows:
- It does not support execution or development of Common Object
File Format (COFF) binaries on which IRIX 4 and earlier
releases are based.
- It provides no way to link Extensible
Linking Format (ELF) object (.o) files, or archives (.a)
containing ELF object files, with COFF object files or archives
containing COFF object files.
- It does not support R2000- and R3000-based systems.
This article tells you how to identify COFF binaries and replace them
with the ELF binaries that IRIX 5.0 and later releases use.
To facilitate the transition to IRIX 6.2 you can load the operating system
on a second disk drive. For information, refer to the "Installing IRIX
on an Arbitrary Disk" section of the article titled, "Installing and
Running IRIX on a Drive Other Than Drive 1" in this issue. For a
detailed description of the features in this new operating system,
refer to the accompanying IRIX 6.2 document.
Background
IRIX 6.2 supports CPUs on the following platforms:
- R4000 (Crimson,** Indy, Indigo (not the R3000 Indigo),
Indigo2, and the CHALLENGE S and M series)
- R4400 (Indy, Indigo2, Onyx, and the CHALLENGE series)
- R4600 (Indy and Indigo2)
- R8000 (POWER CHALLENGE M, L, and XL
series, POWER Onyx, and POWER Indigo2)
Although most IRIX 5 native binaries can run under IRIX 6, there may be
cases that require you to recompile or, even less likely, rewrite
application code. User programs are compatible between IRIX 6.1 and
IRIX 6.2, but you need to recompile device drivers.
Searching Your Disks for COFF Files
You need to substitute ELF binaries for the COFF files that are not
part of an inst subsystem in a standard IRIX distribution, and for all
non-Silicon Graphics, COFF-based applications that you are using. We
have created a script that searches your disks and lists the COFF
files. You can find this script on the Web version of the Developer
Toolbox, which is at the following location:
https://www.sgi.com/toolbox/utilities/coffcheck/
This Web site requires a login ID and password, which are distributed
only to members of the Developer Program. To find out how you can
access this Web site, send an e-mail to devprogram@sgi.com.
- Programs compiled with the -64 option will not run on systems
that support only 32-bit mode. These modes indicate the
pointer size or address space, not the limitation on the size of
integer operations. We will address the issues surrounding 32-
and 64-bit modes in a future issue.
- IRIX 6.2 does not support graphics on Crimson/GTX systems.
Helpful hints on running the coffcheck script:
- Run this script as root.
- The script tells you where it has
left the resulting lists.
- One exception to the ELF-only rule
for IRIX 6.2 is that the kernel files are in COFF format,
due to PROM monitor requirements. The PROM monitor reads,
starts, and transfers control to the kernel during the boot
process. Consequently, even though the script reports that
eoe.sw.unix contains COFF binaries, disregard it.
- If you run coffcheck on an IRIX 5.X system, it will report
COFF binaries in various inst subsystems that were installed
with your operating system. Although you don't need to change
these binaries to ELF format (because you get new ELF versions
when you install the corresponding subsystems for IRIX 6.2),
you do need to replace the COFF binaries that are not part of
any IRIX 5.X system software that you purchased from Silicon
Graphics. As with any operating system upgrade, make sure that
you order the 6.2 equivalents of these products.
Identifying Individual COFF Binaries
If you rely on COFF binaries for your work, do not install IRIX 6.2
until you recompile these files on IRIX 5.2 (or later), or until you
install ELF versions of these files. The irix4 compiler products in
IRIX 5.3 are not available in IRIX 6.2. Because IRIX 5 builds
executables as ELF by default, you should already be shipping
applications in ELF format, or planning to do so by the end of this
year.
To determine if an executable or .o is a COFF or
ELF file, use the file command; for example:
- Enter this command:
if the file is ELF-based, the output will look
like this:
/bin/ls: ELF 32-bit MSB dynamic executable MIPS -
version 1
- Enter this command:
% file /usr/local/foo/stuff
if the file is COFF-based, the output will look like this:
/usr/local/foo/stuff: MIPSEB COFF executable (paged) -
version 3.10
The command in step 1 displays an ELF file, which is compatible with
6.2. However, the command in step 2 reveals a COFF file, for which you
must obtain an ELF-based equivalent.
Files of interest from "utilities/coffcheck" directory
Documentation
Scripts
OR, ...
Copyright © 1995, Silicon Graphics, Inc.