History log of /freebsd-11.0-release/usr.bin/elfdump/elfdump.c
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 303975 11-Aug-2016 gjb

Copy stable/11@r303970 to releng/11.0 as part of the 11.0-RELEASE
cycle.

Prune svn:mergeinfo from the new branch, and rename it to RC1.

Update __FreeBSD_version.

Use the quarterly branch for the default FreeBSD.conf pkg(8) repo and
the dvd1.iso packages population.

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

# 302408 08-Jul-2016 gjb

Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle.
Prune svn:mergeinfo from the new branch, as nothing has been merged
here.

Additional commits post-branch will follow.

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


# 294699 25-Jan-2016 emaste

elfdump: handle STT_SPARC_REGISTER

STT_SPARC_REGISTER is a SPARC-specific symbol type specified by the
Sparcv9 ABI to provide some information on register use by the object.

Also rework st_info type lookup to avoid out-of-bounds array access.

MFC after: 1 week
Sponsored by: The FreeBSD Foundation


# 288194 24-Sep-2015 emaste

Rename ELFOSABI_SYSV to ELFOSABI_NONE to match current spec

Source: http://www.sco.com/developers/gabi/latest/ch4.eheader.html

Reviewed by: kib
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D3731


# 288138 23-Sep-2015 emaste

elfdump: report MIPS ELF section type SHT_MIPS_REGINFO

Sponsored by: The FreeBSD Foundation


# 288083 22-Sep-2015 emaste

elfdump: report MIPS-specific section type SHT_MIPS_ABIFLAGS

Sponsored by: The FreeBSD Foundation


# 285841 24-Jul-2015 emaste

Add RISC-V ELF machine type definition

EM_RISCV is now officially registered as e_machine 243.

MFC after: 1 month
Sponsored by: The FreeBSD Foundation


# 282916 14-May-2015 emaste

Add ELF machine EM_IAMCU, 32-bit Intel MCU

It is e_machine 6, which was previously reserved for 486.


# 274960 24-Nov-2014 brueffer

Limit descriptors and enter capability mode.

Differential: D1009
Reviewed by: jonathan, pjd
MFC after: 2 weeks
Relnotes: yes


# 270304 21-Aug-2014 emaste

elfdump: Remove extraneous _SUNW_ in reported DT_ names

Sponsored by: The FreeBSD Foundation


# 270303 21-Aug-2014 emaste

Rename DT_FEATURE_1 to DT_FEATURE

This provides a minor cleanup in elfdump; there are otherwise no
consumers in the tree. Old SUN documentation can be found for either
variant, but GNU binutils switched to DT_FEATURE around 2000.

Sponsored by: The FreeBSD Foundation


# 269338 31-Jul-2014 emaste

elfdump: use existing ELF constants where available

Sponsored by: The FreeBSD Foundation


# 269337 31-Jul-2014 emaste

elfdump: add EM_AARCH64 64-bit ARM machine architecture


# 269143 26-Jul-2014 andreast

Further improvements on elfdump, to follow up r269092:

- Add ARM specific section header types.
- Add SHT_GNU_HASH section header type.
- Improve reporting of undefined tags in d_tags.
- Add DT_GNU_HASH tag.

Reviewed by: emaste


# 269092 25-Jul-2014 emaste

elfdump: Improve section type reporting

The SHT range 0x70000000-0x7fffffff is processor-specific. Pass the
ELF machine type header to sh_types so the section header type name can
be reported correctly for the given processor.

For all ranges report the actual value for unknown types.

Add MIPS-specific type SHT_MIPS_OPTIONS.

CR: D483
Reviewed by: sbruno, marcel
Sponsored by: DARPA, AFRL


# 267649 19-Jun-2014 marcel

Don't dump core when the ELF file has no section headers. The ELF
core files created by gcore are among those.


# 265613 07-May-2014 emaste

Handle ELF files with 65280 or more sections

If e_shnum or e_shstrndx are at least SHN_LORESERVE (0xff00) then an
escape value is used to indicate that the actual value is found in one
of section 0's fields.

Sponsored by: DARPA, AFRL


# 260621 14-Jan-2014 jhibbits

Add missing EM_PPC64 to e_machine header display.

MFC after: 1 week


# 241737 19-Oct-2012 ed

More -Wmissing-variable-declarations fixes.

In addition to adding `static' where possible:

- bin/date: Move `retval' into extern.h to make it visible to date.c.
- bin/ed: Move globally used variables into ed.h.
- sbin/camcontrol: Move `verbose' into camcontrol.h and fix shadow warnings.
- usr.bin/calendar: Remove unneeded variables.
- usr.bin/chat: Make `line' local instead of global.
- usr.bin/elfdump: Comment out unneeded function.
- usr.bin/rlogin: Use _Noreturn instead of __dead2.
- usr.bin/tset: Pull `Ospeed' into extern.h.
- usr.sbin/mfiutil: Put global variables in mfiutil.h.
- usr.sbin/pkg: Remove unused `os_corres'.
- usr.sbin/quotaon, usr.sbin/repquota: Remove unused `qfname'.


# 231815 16-Feb-2012 eadler

Don't extract the n_type value from the elf header, since it is never used

Fix warning when compiling with gcc46:
variable 'type' set but not used

Approved by: cperciva
MFC after: 3 days


# 226434 16-Oct-2011 marcel

o Use C99 designated initializer to properly handle ELFOSABI_STANDALONE.
o In elf_get_byte(), cast through uint8_t and not char to avoid sign
extension.


# 211188 11-Aug-2010 rpaulo

Teach elfdump(1) about the SUNW_dof section.

Sponsored by: The FreeBSD Foundation


# 154958 28-Jan-2006 marcel

s/DT_IA64_PLT_RESERVE/DT_IA_64_PLT_RESERVE/


# 153500 17-Dec-2005 marcel

Know the machines FreeBSD runs on. Print the machine value for
unknown machines.

MFC after: 1 week


# 126484 02-Mar-2004 jake

Elf_Phdr.p_type 7 is "PT_TLS".


# 119795 06-Sep-2003 schweikh

Removed another spurious semicolon forgotten in the previous commit.


# 119794 06-Sep-2003 schweikh

Removed two spurious semicolons after function definitions.
Removed three spurious tabs on lines by themselves.

PR: bin/56492
Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
MFC after: 6 weeks


# 118680 09-Aug-2003 marcel

Fix sign-extension bug for 32 and 64-bit values. For 64-bit values
this involves the sign-extension of the high and low "word". Both
of which are 32-bit. The bug is especially harmful on ia64, where
0x9fffffffe0000000 is a common address (base of register stack).
This was invariably displayed as 0xffffffffe0000000.

The sign-extension is fixed by using {b|l}e{16|32|64}dec() where
applicable. Since elfdump(1) is not a bootstrap tool, dependency
on these functions is not a problem.


# 117009 28-Jun-2003 ru

Synchronize usage() and SYNOPSIS, and fix them (flags are not
optional here). Sort options. Print the file name on error.


# 110257 03-Feb-2003 obrien

Make WARNS=5 clean even on 64-bit platforms.


# 110256 03-Feb-2003 obrien

Make WARNS=5 on i386, (WARNS=1 on 64-bit platforms).

Submitted by: dwmalone (tweaked by me)


# 110252 02-Feb-2003 obrien

Try to tighten up the types a little bit to help debugging with GDB.


# 109457 18-Jan-2003 marcel

If we're going to build and install this on ia64, we might as well
teach it about ia64 specific section types, dynamic tags and machine
type. This is a mostly insignificant change given the amount of
work that this tool obviously needs...


# 109332 15-Jan-2003 obrien

Like sh_types, dt_tags just aren't in consecutive order, so we have to move
away from indexing into an array. Also add Sun and GNU specific tags.


# 109329 15-Jan-2003 obrien

The defined sh_types's just aren't in consecutive order, so we have to move
away from indexing into an array.


# 109313 15-Jan-2003 obrien

Add a BSDL'ed util that displays information about ELF files.
This is simular to readelf(1) and objdump(1).

Submitted by: jake