History log of /freebsd-current/usr.bin/lorder/lorder.sh
Revision Date Author Comments
# aedb37dc 29-Feb-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

lorder: Don't rely on legacy syntax.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D44155


# 5c7b986c 28-Feb-2024 Dag-Erling Smørgrav <des@FreeBSD.org>

lorder: Clean up and improve robustness.

* Properly parse (no) command-line options.

* Ensure that errors go to stderr and result in a non-zero exit.

* Drop the special-case code for a single argument, as it will produce
the wrong outcome if the file does not exist or is corrupted.

* Don't print anything until after we've collected all the data.

* Always create all temporary files before setting the trap. This
ensures that the trap can safely fire at any moment, regardless of any
previous definition of `T`.

* Use a temporary file rather than a pipe between `nm` and `sed` to
ensure proper termination if `nm` fails due to a missing or invalid
input.

* The check for self-referential entries was conditional on testing our
argument list against a regex looking for archives. This was a
needless and unreliable optimization; make the check unconditional.

* Document that lorder will not work properly if any of its inputs have
spaces in their name.

MFC after: 1 week
Sponsored by: Klara, Inc.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D44133


# bdcbfde3 23-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.bin: Remove ancient SCCS tags.

Remove ancient SCCS tags from the tree, automated scripting, with two
minor fixup to keep things compiling. All the common forms in the tree
were removed with a perl script.

Sponsored by: Netflix


# d0b2dbfa 16-Aug-2023 Warner Losh <imp@FreeBSD.org>

Remove $FreeBSD$: one-line sh pattern

Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/


# e1d6d6f9 18-Oct-2021 Ed Maste <emaste@FreeBSD.org>

lorder: process read-only data symbols

Previously they were skipped. lorder(1) serves no functional purpose
today but we might as well address this longstanding bug while it is
still in the tree.

PR: 133860
MFC after: 1 week
Submitted by: John Hein


# 8a16b7a1 20-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

General further adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 3-Clause license.

The Software Package Data Exchange (SPDX) group provides a specification
to make it easier for automated tools to detect and summarize well known
opensource licenses. We are gradually adopting the specification, noting
that the tags are considered only advisory and do not, in any way,
superceed or replace the license texts.

Special thanks to Wind River for providing access to "The Duke of
Highlander" tool: an older (2014) run over FreeBSD tree was useful as a
starting point.


# fbbd9655 28-Feb-2017 Warner Losh <imp@FreeBSD.org>

Renumber copyright clause 4

Renumber cluase 4 to 3, per what everybody else did when BSD granted
them permission to remove clause 3. My insistance on keeping the same
numbering for legal reasons is too pedantic, so give up on that point.

Submitted by: Jan Schaumann <jschauma@stevens.edu>
Pull Request: https://github.com/freebsd/freebsd/pull/96


# 932d4e19 07-Jul-2016 Ed Maste <emaste@FreeBSD.org>

lorder: produce locale-independent symbol ordering

Found by the Debian reproducible builds effort -- Debian bug 830259.

Reported by: Reiner Herrmann <reiner@reiner-h.de>
Approved by: re (gjb)
Sponsored by: The FreeBSD Foundation


# 25ec8c92 14-Aug-2015 Rui Paulo <rpaulo@FreeBSD.org>

Introduce a new make variable: NMFLAGS.

As the name indicates, these are flags to pass to nm(1). The newer
binutils have a plugin mechanism so, to build something with LLVM's
LTO, we need to pass flags to nm(1). This commit also extends
lorder(1) to pass NMFLAGS to nm(1).


# da52b4ca 11-Dec-2010 Joel Dahl <joel@FreeBSD.org>

Remove the advertising clause from UCB copyrighted files in usr.bin. This
is in accordance with the information provided at
ftp://ftp.cs.berkeley.edu/pub/4bsd/README.Impt.License.Change

Also add $FreeBSD$ to a few files to keep svn happy.

Discussed with: imp, rwatson


# a7d5f7eb 19-Oct-2010 Jamie Gritton <jamie@FreeBSD.org>

A new jail(8) with a configuration file, to replace the work currently done
by /etc/rc.d/jail.


# fe0506d7 09-Mar-2010 Marcel Moolenaar <marcel@FreeBSD.org>

Create the altix project branch. The altix project will add support
for the SGI Altix 350 to FreeBSD/ia64. The hardware used for porting
is a two-module system, consisting of a base compute module and a
CPU expansion module. SGI's NUMAFlex architecture can be an excellent
platform to test CPU affinity and NUMA-aware features in FreeBSD.


# d7f03759 19-Oct-2008 Ulf Lilleengen <lulf@FreeBSD.org>

- Import the HEAD csup code which is the basis for the cvsmode work.


# e46be7ff 15-Jul-2005 Ruslan Ermilov <ru@FreeBSD.org>

Fix loder(1) to work with libraries. This can be useful to
sort long DPADD lists automatically. While here, recognize
`W' as the global symbol. This has been tested since 2004.


# ebe5d44d 01-Jun-2003 Tim J. Robbins <tjr@FreeBSD.org>

Give the -o option before any filename operands when invoking the sort
utility. 1003.1-2001 does not allow sort to accept the -o option after
the operands (Base Definitions, 12.2 Utility Syntax Guidelines,
Guideline 9).


# 197442ec 24-Sep-2002 Andrey A. Chernov <ache@FreeBSD.org>

Make it work with POSIX sort (POS arg)
All old sorts understand -k too.


# 7172dc3b 06-Mar-2001 Doug Rabson <dfr@FreeBSD.org>

Pick up the environment variable ${NM} if it exists and use that to list
symbols. This allows lorder to be used more easily in a cross-build
environment.


# b75cda59 17-May-2000 Tim Vanderhoek <hoek@FreeBSD.org>

Use different filenames.

Submitted by: bin/16927, Mike Heffner


# 559628a1 15-Aug-1998 John Birrell <jb@FreeBSD.org>

Removed explict PATH which tended to cause the *wrong* path to be used
more often than not.

Also included Doug Rabson's changes to make this script better handle the
two varieties of nm output we now have.


# 9b50d902 26-May-1994 Rodney W. Grimes <rgrimes@FreeBSD.org>

BSD 4.4 Lite Usr.bin Sources