NAME
xar - compound executable archiver
SYNOPSIS
xar key[modifier] cce <arguments>
xar -c[v] cce { [-t tag] obj } ...
xar -d[v] cce { tag } ...
xar -r[v] cce { [-t tag] obj } ...
xar -t[v] cce [tag ...]
xar -x[v] cce [tag ...]
DESCRIPTION
xar maintains groups of files combined into a single compound executable
called cmpexe, which is its own object type. Its main use is as an
instruction-set-independent container for both Series 10000 and 680x0-
based executable object files.
A cmpexe file can contain two complete, executable versions of the same
program: one version executes on the Series 10000 workstation and the
other executes on a 680x0-based workstation. The loader determines which
module of the file it should load in memory, based on whether the code is
to execute on a Series 10000 or 680x0-based workstation.
The cmpexe object type is especially useful if you are creating a
released product that can execute on either machine type. It is also a
useful way to simplify the file system of a network consisting of both
Series 10000 and 680x0-based workstations. For example, the user-space
commands that we supply may be installed as compound executables.
cce is the name of the compound executable. obj is the constituent file.
tag is the name by which a file is identified and referenced once it has
been inserted in a cce. key is a character from the set {c, d, r, t, x}.
These can be optionally concatenated with v (verbose) modifier.
c Create a compound executable.
d Delete the named modules from the compound executable.
r Replace a module tagged <tag> in the compound executable with the file
specified on the command line. If no tag is given, it defaults to m68k
for 680x0 object modules (COFF, obj, or unstruct) and to a88k for
Series 10000 object modules. If a module with the tag is not in the
compound executable, create one.
t Print a table of contents of the compound executable. If no tag names
are given, all modules in the compound executable are included in the
table. If names are given, only the specified modules are included.
x Extract all modules in the compound executable, or only those that are
named. Do not alter the compound executable itself.
v Provide a file-by-file description of the making of a new compound
executable from the old compound executable and its constituent files.
When used with a t option, this modifier generates a long listing of
all information about the files. When used with an x option, it
precedes each named file with the listing. (Applies to all commands.)
You access or execute a Series 10000 object code module or a 680x0-based
object code module in a compound executable just as you would any other
object in the file system. The operating system includes a type manager
and loader support that enables you to access or execute the module that
represents the machine type of your node. At the command line, you
specify the pathname of the compound executable, and the loader executes
the appropriate module.
If you are working at a 680x0-based workstation and the pathname of the
compound executable that you want to access is
//another_node/prog_dir/prog1 and you want to copy the Series 10000
module to /my_dir, you enter the following command line:
cpf //another_node/prog_dir/prog1/a88k /my_dir/prog1.a88k
EXAMPLE
The following example command lines result in separate compilations of
the same source code sample.c for the two machine types and use the xar
command to combine them in a single compound executable named sample.
First is the command line that compiles for the Series 10000 workstation
(the -cpu option is used to identify the machine type of the object
code):
$ /com/cc sample.c -b sample.a88k.bin -cpu 10000
Next is the command line that compiles for the 680x0-based machine (in
this case, a DN3000 workstation):
$ /com/cc sample.c -b sample.m68k.bin -cpu 3000
Next is the xar command that creates a compound executable containing
both object modules (the tags following each -t identify the modules once
they are in the compound executable):
$ xar -c sample -t a88k sample.a88k.bin -t m68k sample.m68k.bin
The last command line lists the contents (by tag name) of the compound
executable. Sample output follows the command line.
$ xar -tv sample
type offset size alignment last-modified tag
coff 0 1590 524288 88/06/20.10:05 a88k
coff 32768 1583 32768 88/06/20.10:01 m68k