History log of /freebsd-10.1-release/usr.sbin/crunch/crunchide/exec_elf32.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 272461 02-Oct-2014 gjb

Copy stable/10@r272459 to releng/10.1 as part of
the 10.1-RELEASE process.

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

# 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


# 246298 03-Feb-2013 pfg

crunchide(1): Put e_shnum into a local variable.

This simplifies the code a bit.

Submitted by: Cristoph Mallon
MFC after: 2 weeks


# 246296 03-Feb-2013 pfg

crunchide(1): support non-custom elf object layout

The crunchide utility presumes the last 3 chunks of an ELF object
layout are section headers, symbol table, and then string table.
However, this is not specified in the ELF standards, and linkers
may generate different layouts when doing partial linking (-r).

This change is required to build FreeBSD with mclinker or the
gold linker.

PR: bin/174011
Submitted by: Pete Chou
Reviewed by: Cristoph Mallon
MFC after: 2 weeks


# 246278 03-Feb-2013 pfg

crunch: Sync some NetBSD changes

Fix a couple of free's in previous commit.

Obtained from: NetBSD
MFC after: 1 week


# 246256 02-Feb-2013 pfg

crunch: Sync some NetBSD changes.

crunchide:
Apr 11, 2009: fix some -Wsign-compare issues.
Sep 20, 1999: Free the right thing.

crunchgen:
Apr 14, 2009: Fix some WARNS=4 issues (-Wshadow -Wcast-qual)
Oct 30, 2004: Add (unsigned char) cast to ctype functions
Feb 5, 2001: fix nested extern.

examples:
Aug 30, 2007: NetBSD 36867 - trsp references are deprecated

Obtained from: NetBSD
MFC after: 1 week


# 237254 19-Jun-2012 eadler

Remove variables which are initialized but never used thereafter reported by gcc46 warning

Approved by: cperciva
MFC After: 3 days


# 211222 12-Aug-2010 adrian

Fix crunchide to work on sparc64 and perhaps other 64 bit platforms.

I used the wrong type when setting st_name in the symbol table entry
struct. It's an Elf64_Word which is defined as an unsigned 32 bit int
on both 32 and 64 bit platforms.

To make things sensible, define some new macros to use as "word" macros
and use those, rather than simply using the explicit 32 bit macros.


# 211137 10-Aug-2010 adrian

Port over changes to the crunch symbol hiding method from NetBSD.

The older symbol hiding method breaks for MIPS. This implements
symbol hiding through renaming to a symbol name which is highly
unlikely to clash.

The NetBSD code didn't use byte-swapping macros for endian-awareness;
so it didn't work when cross-compiling a MIPS world on i386/amd64.
This patch includes those (as best as I could figure what they
should be) and has been tested to generate valid MIPS crunch
binaries both cross- and native- compiled.


# 209889 10-Jul-2010 nwhitehorn

Teach crunchide(1) about PPC ELF64.


# 182725 03-Sep-2008 obrien

Introduce crunchide to the ELF e_machine MIPS values.


# 153504 18-Dec-2005 marcel

Make our ELF64 type definitions match standards. In particular this
means:
o Remove Elf64_Quarter,
o Redefine Elf64_Half to be 16-bit,
o Redefine Elf64_Word to be 32-bit,
o Add Elf64_Xword and Elf64_Sxword for 64-bit entities,
o Use Elf_Size in MI code to abstract the difference between
Elf32_Word and Elf64_Word.
o Add Elf_Ssize as the signed counterpart of Elf_Size.

MFC after: 2 weeks


# 130155 06-Jun-2004 cognet

Tell crunchide to deal with arm elf binaries as well.
Rescue can now be built for arm.


# 118656 08-Aug-2003 ru

Fix a bug that caused i386 to produce broken binaries for big-endian
64-bit platforms. (size_t is 32bit on i386, but Elf_Shdr.sh_size is
64bit on SPARC64.)


# 117857 21-Jul-2003 obrien

Teach crunchide(1) about PowerPC ELF.

PR: 54526
Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>


# 115757 02-Jun-2003 peter

Add AMD64 support.


# 112767 29-Mar-2003 obrien

Back out the totally unapproved backout of my commits.


# 112192 13-Mar-2003 ru

Complete the endianness support -- sparc64 can now do i386.

Tested on: sparc64 -> i386, i386 -> sparc64
Debugged by: elfdump(1)


# 110033 29-Jan-2003 ru

Part 1/3 of unbreaking cross releases:

Back out the removal of custom version of endian.h system header.
On recent systems, it just falls back to <sys/endian.h>. But on
older systems like 5.0-DP1 or 4-STABLE, this private version may
be necessary, as crunchide(1) is a cross-tool for "make release".

Spotted by: kris, markm


# 108440 30-Dec-2002 obrien

Use <sys/endian.h> rather than a private verison.

Tested on: sparc64, Athlon[32]


# 106848 13-Nov-2002 ru

Bootstrapping aid for 4.0-RELEASE.


# 97226 24-May-2002 ru

Handle endianness. This completes cross-support for sparc64.


# 97068 21-May-2002 ru

Added support for ia64 and sparc64.


# 95781 30-Apr-2002 ru

Make crunchide(1) a cross-tool; needed for cross-arch "make release".
Note that a.out is only supported for the non-cross i386 case.


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


# 39172 14-Sep-1998 jkh

Teach crunch about an elf/a.out world.
Submitted by: jhay