Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

lorder(1) [osf1 man page]

lorder(1)						      General Commands Manual							 lorder(1)

NAME
lorder - Finds the best order for member files in an object library SYNOPSIS
lorder file... DESCRIPTION
The lorder command is essentially obsolete. Use the following command in its place: % ar -ts file.a The lorder command reads one or more object or library archive files, looks for external references, and writes a list of paired filenames to standard output. The first of each pair of files contains references to identifiers that are defined in the second file. You can send this list to the tsort command to find an ordering of a library member file suitable for 1-pass access by ld. If object files do not end with lorder overlooks them and attributes their global symbols and references to some other file. EXAMPLES
To create a subroutine library, enter: lorder charin.o scanfld.o scan.o scanln.o | tsort | xargs ar qv libsubs.a (Enter this command entirely on one line, not on two lines as shown above.) This creates a subroutine library named libsubs.a that contains charin.o, scanfld.o, scan.o, and scanln.o. The ordering of the object mod- ules in the library is important. The lorder and tsort commands together add the subroutines to the library in the proper order. Suppose that scan.o calls entry points in scanfld.o and scanln.o. scanfld.o also calls entry points in charin.o. First, the lorder command creates a list of pairs that shows these dependencies: charin.o charin.o scanfld.o scanfld.o scan.o scan.o scanln.o scanln.o scanfld.o charin.o scanln.o charin.o scan.o scanfld.o This list is piped to the tsort command, which converts the list into the ordering that is needed: scan.o scanfld.o scanln.o charin.o Note that each module precedes the module it calls. charin.o, which does not call another module, is last. The second list is then piped to xargs, which constructs and runs the following ar command: ar qv libsubs.a scan.o scanfld.o scanln.o charin.o This ar command creates the properly ordered library. FILES
Temporary files SEE ALSO
Commands: ar(1), as(1), cc(1), ld(1), make(1), nm(1), size(1), strip(1), tsort(1), xargs(1) Files: a.out(4), ar(4) lorder(1)

Check Out this Related Man Page

tsort(1)						      General Commands Manual							  tsort(1)

NAME
tsort - Sorts an unordered list of ordered pairs (topological sort) SYNOPSIS
tsort [file] STANDARDS
Interfaces documented on this reference page conform to industry standards as follows: tsort: XCU5.0 Refer to the standards(5) reference page for more information about industry standards and associated tags. OPTIONS
None OPERANDS
Pathname of a test file to be ordered. If no file operand is specified, tsort reads standard input. DESCRIPTION
The tsort command reads from file or standard input an unordered list of ordered pairs, builds an ordered list, and writes it to standard output. [Tru64 UNIX] For creating a subroutine library, do not use tsort; use the following command in its place: % ar -ts file.a The input file should contain pairs of nonempty strings separated by spaces. Pairs of different items indicate a relative order. Pairs of identical items indicate presence, but no relative order. [Tru64 UNIX] You can use tsort to sort the output of the lorder command. [Tru64 UNIX] If file contains an odd number of fields, tsort writes the error message: tsort: Specify an even number of data fields. NOTES
The LC_COLLATE environment variable does not affect the actions of tsort. EXIT STATUS
The following exit values are returned: Successful completion. An error occurred. EXAMPLES
To create a subroutine library, enter: lorder charin.o scanfld.o scan.o scanln.o | tsort | xargs ar qv libsubs.a (Enter the command entirely on one line, not on two lines as shown above.) This creates a subroutine library named libsubs.a that contains charin.o, scanfld.o, scan.o, and scanln.o. The ordering of the object mod- ules in the library is important. The ld command requires each module to precede all the other modules that it calls or references. The lorder and tsort commands together add the subroutines to the library in the proper order. Suppose that scan.o calls scanfld.o and scanln.o. scanfld.o also calls charin.o. First, the lorder command creates a list of pairs that shows these dependencies: charin.o charin.o scanfld.o scanfld.o scan.o scan.o scanln.o scanln.o scanfld.o charin.o scanln.o charin.o scan.o scanfld.o Next, the | (vertical bar) sends this list to the tsort command, which converts it into the ordering you need: scan.o scanfld.o scanln.o charin.o Note that each module precedes the module it calls. charin.o, which does not call another module, is last. The second | (vertical bar) then sends this list to xargs, which constructs and runs the following ar command: ar qv libsubs.a scan.o scanfld.o scanln.o charin.o This ar command creates the properly ordered library. ENVIRONMENT VARIABLES
The following environment variables affect the execution of tsort: Provides a default value for the internationalization variables that are unset or null. If LANG is unset or null, the corresponding value from the default locale is used. If any of the internationalization vari- ables contain an invalid setting, the utility behaves as if none of the variables had been defined. If set to a non-empty string value, overrides the values of all the other internationalization variables. Determines the locale for the interpretation of sequences of bytes of text data as characters (for example, single-byte as opposed to multibyte characters in arguments). Determines the locale for the for- mat and contents of diagnostic messages written to standard error. Determines the location of message catalogues for the processing of LC_MESSAGES. SEE ALSO
Commands: ar(1), lorder(1), xargs(1) Standards: standards(5) tsort(1)
Man Page