xref: /titanic_51/usr/src/man/man1/lorder.1 (revision 356f72340a69936724c69f2f87fffa6f5887f885)
te
Copyright (c) 1996, Sun Microsystems, Inc. All Rights Reserved.
Copyright 1989 AT&T
The contents of this file are subject to the terms of the Common Development and Distribution License (the "License"). You may not use this file except in compliance with the License.
You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License.
When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
LORDER 1 "Oct 29, 1991"
NAME
lorder - find ordering relation for an object or library archive
SYNOPSIS

lorder filename...
DESCRIPTION

The input is one or more object or library archive filenames (see ar(1)). The standard output is a list of pairs of object file or archive member names; the first file of the pair refers to external identifiers defined in the second. The output may be processed by tsort(1) to find an ordering of a library suitable for one-pass access by ld. Note that the link editor ld is capable of multiple passes over an archive in the portable archive format (see ar.h(3HEAD)) and does not require that lorder be used when building an archive. The usage of the lorder command may, however, allow for a more efficient access of the archive during the link edit process.

The following example builds a new library from existing .o files.

ar \|-cr \|library \|`\|lorder \|*.o \|| \|tsort\|`

FILES
TMPDIR/*symref

temporary files

TMPDIR/*symdef

temporary files

TMPDIR

usually /var/tmp but can be redefined by setting the environment variable TMPDIR (see tempnam() in tmpnam(3C))

SEE ALSO

ar(1), ld(1), tsort(1), tmpnam(3C), ar.h(3HEAD), attributes(5)

NOTES

lorder will accept as input any object or archive file, regardless of its suffix, provided there is more than one input file. If there is but a single input file, its suffix must be .o.

The length of the filename for TMPDIR is limited to whatever sed allows.