moving from COFF to ELF with the help of coffcheck

HUB | Up | Download | Pheedbak | Tree | Topic | A-Z | Search | Hot | New


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:

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:

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:

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.

Helpful hints on running the coffcheck script:

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:

  1. Enter this command:

    if the file is ELF-based, the output will look like this:

  2. Enter this command:

    if the file is COFF-based, the output will look like this:

    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


    Select any combo of files you'd like to send yourself a compressed tar image of. Executables/scripts are indicated with a trailing `*' character. (Depending upon the browser, it may be necessary to hold down the Ctrl key to select/deselect disjoint items.)
    a compressed tar image of the above-selected items.
    OR, ...
    a compressed tar image of the entire coffcheck directory.

    Copyright © 1995, Silicon Graphics, Inc.