LinuxCommandLibrary

lorder

lists dependencies between object files

TLDR

Find library dependencies

$ lorder [*.o]
copy
Create library order
$ lorder [*.o] | tsort
copy
Process specific files
$ lorder [file1.o] [file2.o] [file3.o]
copy
Pipe to archive creation
$ ar cr libfoo.a $(lorder [*.o] | tsort)
copy

SYNOPSIS

lorder files

DESCRIPTION

lorder lists dependencies between object files. It outputs pairs showing which files depend on others.
The output is typically piped to tsort to determine correct ordering for static libraries.

PARAMETERS

FILES

Object files to analyze.

CAVEATS

BSD utility. May not be available on all systems. Used with tsort and ar.

HISTORY

lorder is a traditional BSD utility for determining the order of object files in static libraries.

SEE ALSO

tsort(1), ar(1), nm(1), ld(1)

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community