LORDER(1)
π
LORDER(1) β the lorder glow-up (General Commands Manual, bestie) π
okay so picture this: it's a General Commands Manual page, the command is literally called lorder, and she is here to tell you which of your files are emotionally dependent on which other files. we love a matchmaker. π
β¨ NAME β¨
lorder β list dependencies for object files. that's it, that's the whole vibe. she lists. she orders. she slays. π
π¦ SYNOPSIS π¦
lorder file ...
yep. just hand her a bunch of files and step back. πΈ
π₯ DESCRIPTION π₯
okay so lorder uses nm(1) to figure out the whole interdependency web between the object files and library archives you listed on her command line. think of her as the group chat admin who knows exactly who's talking to who. π
then she outputs a list of pairs of file names, where the first file in each pair references at least one symbol that the second file defines. mutuals, basically. fr fr. π«Ά
the output is normally used with tsort(1) when a library gets created, so you can figure out the optimum ordering of the object modules β that way all references get resolved in a single pass of the loader. one pass. no cap. efficiency is the moment. β‘
similarly, when you're linking static binaries, lorder and tsort(1) can be used to sort libraries in order of dependency. iconic teamwork, honestly. π€
now, lowkey a little lore drop: contemporary linkers no longer require the use of lorder. periodt. she's still here though β provided for the benefit of legacy code bases and build systems which still insist on it. main character energy in a museum exhibit. ποΈπ
π ENVIRONMENT π
NMβ the path to thenm(1)binary, defaults to"nm". yes bestie, you can point her at a different one. πNMFLAGSβ flags to pass tonm(1). give the girl some options. π
π EXAMPLES π
the sacred texts, preserved character for character:
ar cr library.a `lorder ${OBJS} | tsort`
cc -o foo ${OBJS} `lorder ${STATIC_LIBS} | tsort`
ate. no notes. π₯
π§ SEE ALSO π§
ar(1), ld(1), nm(1), ranlib(1), tsort(1)
the whole friend group honestly π
β HISTORY β
a lorder utility appeared in Version 7 AT&T UNIX. she's been booked and busy since the beginning, iykyk. π
π CAVEATS π
bestie. listen. lorder will not work properly if you give her file names with spaces or newlines in them. π
like she will simply not be okay about it. name your files like a normal person, please and thank you. π
and that's the page!! brought to you by Debian, dated February 27, 2024 β mwah, go sort your libraries, bestie πβ¨π
π¦ where this page comes from
- freebsd 15.1: base 15.1
- nixpkgs unstable: developer_cmds 89
- Copyright (c) 1990, 1993 The Regents of the University of California. All rights reserved
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms