History log of /freebsd-9.3-release/usr.sbin/crunch/crunchide/exec_elf32.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 267654 19-Jun-2014 gjb

Copy stable/9 to releng/9.3 as part of the 9.3-RELEASE cycle.

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

# 246895 17-Feb-2013 pfg

MFC r246296, r246298, r246346;

crunchide: support non-custom elf object layout.
crunchgen: Permit use of alternative linkers.
crunchide: Put e_shnum into a local variable. [1]

Submitted by: Pete Chou
Reviewed by: Christoph Mallon [1]


# 246580 09-Feb-2013 pfg

MFC r246278;

crunch: some more NetBSD syncing.

Obtained from: NetBSD


# 246576 08-Feb-2013 pfg

MFC r237574, r237625, r246256;

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

In order to merge this I also had to merge some previous changes:
- Ensure crunchen uses the same make binary as the rest of the
build.
- Some amount of style(9): function definitions, header ordering,
and $FreeBSD$.


# 237424 22-Jun-2012 eadler

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

PR: bin/163847
Approved by: cperciva (implicit)


# 225736 22-Sep-2011 kensmith

Copy head to stable/9 as part of 9.0-RELEASE release cycle.

Approved by: re (implicit)


# 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