History log of /freebsd-10-stable/usr.bin/brandelf/brandelf.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 229908 10-Jan-2012 eadler

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

Approved by: dim
MFC after: 3 days


# 228991 30-Dec-2011 uqs

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.


# 146466 21-May-2005 ru

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


# 145807 02-May-2005 green

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


# 97748 02-Jun-2002 schweikh

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

Spotted and suggested by: des
MFC after: 3 weeks


# 87628 10-Dec-2001 dwmalone

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.


# 87248 02-Dec-2001 markm

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

OK'ed by: obrien


# 78627 22-Jun-2001 obrien

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.


# 76225 02-May-2001 obrien

Fix $FreeBSD$ style.


# 76224 02-May-2001 obrien

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


# 72093 06-Feb-2001 asmodai

Fix typo: compatability -> compatibility.

Compatability is not an existing english word.


# 62375 02-Jul-2000 imp

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


# 62313 01-Jul-2000 green

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.


# 59342 18-Apr-2000 obrien

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


# 55377 04-Jan-2000 wes

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


# 50477 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 43407 30-Jan-1999 newton

Added "SVR4" as an acceptable brand


# 35366 21-Apr-1998 eivind

Add a forgotten 'static'.


# 35364 21-Apr-1998 eivind

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>


# 28620 23-Aug-1997 joerg

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>


# 26837 23-Jun-1997 charnier

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


# 25984 21-May-1997 jdp

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.


# 24360 29-Mar-1997 imp

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


# 23012 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 22499 09-Feb-1997 joerg

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

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


# 21673 14-Jan-1997 jkh

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.


# 18962 16-Oct-1996 sos

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