History log of /freebsd-current/usr.bin/brandelf/brandelf.c
Revision Date Author Comments
# 5e3934b1 24-Nov-2023 Warner Losh <imp@FreeBSD.org>

usr.bin: Automated cleanup of cdefs and other formatting

Apply the following automated changes to try to eliminate
no-longer-needed sys/cdefs.h includes as well as now-empty
blank lines in a row.

Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
Remove /\n+#if.*\n#endif.*\n+/
Remove /^#if.*\n#endif.*\n/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/

Sponsored by: Netflix


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

Remove $FreeBSD$: one-line .c pattern

Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/


# 498a0a9c 07-Jul-2023 Alfonso Gregory <gfunni234@gmail.com>

Mark usage function as __dead2 in programs where it does not return

In most cases, usage does not return, so mark them as __dead2. For the
cases where they do return, they have not been marked __dead2.

Reviewed by: imp
Pull Request: https://github.com/freebsd/freebsd-src/pull/735


# 7ef518c0 05-Nov-2019 Mark Johnston <markj@FreeBSD.org>

fileargs_init() sets errno on failure.

Sponsored by: The FreeBSD Foundation


# d76eef34 17-Apr-2019 Ed Maste <emaste@FreeBSD.org>

cap_fileargs: chase r346315, update fileargs_init in consumers

Reported by: ci.freebsd.org (8 times so far)
MFC after: 3 weeks
MFC with: r346315
Sponsored by: The FreeBSD Foundation


# ce57fd97 17-Nov-2018 Mariusz Zaborski <oshogbo@FreeBSD.org>

brandelf: capsicumize it


# d72ba183 17-Nov-2018 Mariusz Zaborski <oshogbo@FreeBSD.org>

brandelf: fix style nits

No functional change intended.

Reviewed by: emaste, markj
Differential Revision: https://reviews.freebsd.org/D17966


# 1de7b4b8 27-Nov-2017 Pedro F. Giffuni <pfg@FreeBSD.org>

various: general adoption of SPDX licensing ID tags.

Mainly focus on files that use BSD 2-Clause license, however the tool I
was using misidentified many licenses so this was mostly a manual - error
prone - task.

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.

No functional change intended.


# fdba8122 09-Jan-2012 Eitan Adler <eadler@FreeBSD.org>

Fix warning when compiling with gcc46:
error: variable 'verbose' set but not use

Approved by: dim
MFC after: 3 days


# fb2ad9d3 30-Dec-2011 Ulrich Spörlein <uqs@FreeBSD.org>

Reencode files from latin1 to UTF-8.

This makes a tiny percentage of entries in calendars ugly for latin1
users, but fixes them for UTF-8 users.

This badly needs a solution involving locale-dependent re-encoding.


# 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.


# f682f10c 21-May-2005 Ruslan Ermilov <ru@FreeBSD.org>

Sync program's usage() with manpage's SYNOPSIS.


# 816e8c03 02-May-2005 Brian Feldman <green@FreeBSD.org>

Make brandelf(1)'s -t "ABI format" case insensitive, as the ABI value
given is looked up in a table and no longer stored literally in the
header.

Submitted by: Divacky Roman <xdivac02@stud.fit.vutbr.cz
PR: 80499
MFC After: 1 month


# 21dc7d4f 02-Jun-2002 Jens Schweikhardt <schweikh@FreeBSD.org>

Fix typo in the BSD copyright: s/withough/without/

Spotted and suggested by: des
MFC after: 3 weeks


# 9f5b04e9 10-Dec-2001 David Malone <dwmalone@FreeBSD.org>

Style improvements recommended by Bruce as a follow up to some
of the recent WARNS commits. The idea is:

1) FreeBSD id tags should follow vendor tags.
2) Vendor tags should not be compiled (though copyrights probably should).
3) There should be no blank line between including cdefs and __FBSDIF.


# 7f1afe0e 02-Dec-2001 Mark Murray <markm@FreeBSD.org>

Style fixes.
Use __FBSDID().
Be consistent WRT ANSI use.

OK'ed by: obrien


# b0b70958 22-Jun-2001 David E. O'Brien <obrien@FreeBSD.org>

Quiet compiler warnings by making `WARNS 2' clean.

Submitted by: Mike Barcroft <mike@q9media.com>

Set maintainer to myself. This needs to stay in sync with what Buntils
does, and it would be best to pass functionality changes thru me to make
sure future plans are taken into account.


# 31255c78 02-May-2001 David E. O'Brien <obrien@FreeBSD.org>

Fix $FreeBSD$ style.


# 5e6220d9 02-May-2001 David E. O'Brien <obrien@FreeBSD.org>

* include/elf.h has been repo copied to include/elf-hints.h, and it no
longer includes machine/elf.h.
* consumers of elf.h now use the minimalist elf header possible.

This change is motivated by Binutils 2.11.0 and too much clashing over
our base elf headers and the Binutils elf headers.


# 2fa72ea7 05-Feb-2001 Jeroen Ruigrok van der Werven <asmodai@FreeBSD.org>

Fix typo: compatability -> compatibility.

Compatability is not an existing english word.


# 9fb58014 01-Jul-2000 Warner Losh <imp@FreeBSD.org>

fix fd leak by close(fd) at end of loop.


# b4739f39 30-Jun-2000 Brian Feldman <green@FreeBSD.org>

The SVR4 module calls itself ELFOSABI_SOLARIS, and who am I to disagree
if it runs my Solaris binaries? Add the missing "Solaris" type here
so that binaries may be branded with it rather than the seemingly-
defunct ELFOSABI_SVR4.


# c815a20c 17-Apr-2000 David E. O'Brien <obrien@FreeBSD.org>

Change our ELF binary branding to something more acceptable to the Binutils
maintainers.

After we established our branding method of writing upto 8 characters of
the OS name into the ELF header in the padding; the Binutils maintainers
and/or SCO (as USL) decided that instead the ELF header should grow two new
fields -- EI_OSABI and EI_ABIVERSION. Each of these are an 8-bit unsigned
integer. SCO has assigned official values for the EI_OSABI field. In
addition to this, the Binutils maintainers and NetBSD decided that a better
ELF branding method was to include ABI information in a ".note" ELF
section.

With this set of changes, we will now create ELF binaries branded using
both "official" methods. Due to the complexity of adding a section to a
binary, binaries branded with ``brandelf'' will only brand using the
EI_OSABI method. Also due to the complexity of pulling a section out of an
ELF file vs. poking around in the ELF header, our image activator only
looks at the EI_OSABI header field.

Note that a new kernel can still properly load old binaries except for
Linux static binaries branded in our old method.

*
* For a short period of time, ``ld'' will also brand ELF binaries
* using our old method. This is so people can still use kernel.old
* with a new world. This support will be removed before 5.0-RELEASE,
* and may not last anywhere upto the actual release. My expiration
* time for this is about 6mo.
*


# b5ce857b 03-Jan-2000 Wes Peters <wes@FreeBSD.org>

Make brandelf explain itself a little better on error.
Also, at Boris' suggestion, add -l option to list known
ELF types.

PR: bin/15285
Reviewed by: bp


# c3aac50f 27-Aug-1999 Peter Wemm <peter@FreeBSD.org>

$Id$ -> $FreeBSD$


# d81380b4 29-Jan-1999 Mark Newton <newton@FreeBSD.org>

Added "SVR4" as an acceptable brand


# 7b206e11 20-Apr-1998 Eivind Eklund <eivind@FreeBSD.org>

Add a forgotten 'static'.


# e3e9c8ee 20-Apr-1998 Eivind Eklund <eivind@FreeBSD.org>

Make brandelf test for known brands, and introduce a '-f' option to
bypass the testing.

Partially submitted by: Brian Feldman <green@feldman.dyn.ml.org>


# 6fe38228 23-Aug-1997 Joerg Wunsch <joerg@FreeBSD.org>

Open the file r/o if looking only. Make the error message more useful.

PR: bin/3283
Submitted by: Martin Kammerhofer <dada@freepass.tu-graz.ac.at>


# 4f971ac4 23-Jun-1997 Philippe Charnier <charnier@FreeBSD.org>

Use err(3). Typo fix in usage string.


# 5851a365 21-May-1997 John Polstra <jdp@FreeBSD.org>

Fill out the ELF header files to make them more or less complete.
Fix a macro name that was misspelled both in brandelf.c and
imgact_elf.h.


# 1c8af878 28-Mar-1997 Warner Losh <imp@FreeBSD.org>

compare return value from getopt against -1 rather than EOF, per the final
posix standard on the topic.


# c115df18 22-Feb-1997 Peter Wemm <peter@FreeBSD.org>

Revert $FreeBSD$ to $Id$


# b5b54135 09-Feb-1997 Joerg Wunsch <joerg@FreeBSD.org>

Add a manpage for brandelf(1). Minor stylistic fixes, and a buffer
overrun fix, too.

Submitted by: John-Mark Gurney <jmg@nike.efn.org>


# 1130b656 14-Jan-1997 Jordan K. Hubbard <jkh@FreeBSD.org>

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# fcfc24ca 16-Oct-1996 Søren Schmidt <sos@FreeBSD.org>

Utility to "brand" ELF binaries.
Man page to come...
For now use: <brandelf -t Linux linuxbin> to brand, and just
<brandelf> to verify branding on a ELF file. FreeBSD native is
set with <brandelf -t FreeBSD freebsdbin>.