lorder(1)
NAME
lorder − find ordering relation for an object library
SYNOPSIS
lorder [files]
DESCRIPTION
The input consists of one or more object or library archive files (see ar(1)) placed on the command line or read from standard input. The standard output is a list of pairs of object file names, meaning that the first file of the pair refers to external identifiers defined in the second. Output can be processed by tsort to find an ordering of a library suitable for one-pass access by ld (see tsort(1) and ld(1)) Note that the link editor ld is capable of multiple passes over an archive in the archive format and does not require that lorder be used when building an archive. Using the lorder command may, however, allow for a slightly more efficient access of the archive during the link edit process.
EXTERNAL INFLUENCES
International Code Set Support
Single- and multi-byte character code sets are supported.
EXAMPLES
Build a new library from existing .o files:
ar cr library ‘lorder (**.o | tsort‘
When creating libraries with so many objects that the shell cannot properly handle the *.o expansion, the following technique may prove useful:
ls | grep ’.o$’ | lorder | tsort | xargs ar cq library
WARNINGS
Object files whose names do not end with .o are overlooked, even when contained in library archives. Their global symbols and references are attributed to some other file.
DEPENDENCIES
Series 700/800:
The symbol table maintained by the Series 700/800 version of ar allows ld to randomly access symbols and files in the archive, making the use of lorder unnecessary when building archive libraries (see ar(1)).
FILES
/tmp/*symref, temporary files
/tmp/*symdef
SEE ALSO
STANDARDS CONFORMANCE
lorder: SVID2, XPG2
Hewlett-Packard Company — HP-UX Release 9.0: August 1992