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(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`
|