Commit Graph

33 Commits

Author SHA1 Message Date
Simon J. Gerraty
cc3f4b9965 Merge from head 2014-05-08 23:54:15 +00:00
Ed Maste
97a9b0b123 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
2014-05-07 21:16:47 +00:00
Simon J. Gerraty
3b8f084595 Merge head 2014-04-28 07:50:45 +00:00
Justin Hibbits
fee1155508 Add missing EM_PPC64 to e_machine header display.
MFC after:	1 week
2014-01-14 04:28:41 +00:00
Simon J. Gerraty
7cf3a1c6b2 Updated dependencies 2013-03-11 17:21:52 +00:00
Simon J. Gerraty
f5f7c05209 Updated dependencies 2013-02-16 01:23:54 +00:00
Simon J. Gerraty
23090366f7 Sync from head 2012-11-04 02:52:03 +00:00
Ed Schouten
bf70becee6 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'.
2012-10-19 14:49:42 +00:00
Marcel Moolenaar
7750ad47a9 Sync FreeBSD's bmake branch with Juniper's internal bmake branch.
Requested by: Simon Gerraty <sjg@juniper.net>
2012-08-22 19:25:57 +00:00
Eitan Adler
097cd85002 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
2012-02-16 05:16:55 +00:00
Marcel Moolenaar
ead616352b 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.
2011-10-16 14:11:05 +00:00
Rui Paulo
bf7cda5121 Teach elfdump(1) about the SUNW_dof section.
Sponsored by:	The FreeBSD Foundation
2010-08-11 18:02:48 +00:00
Ruslan Ermilov
aa4a335bae Use the newly brought %U macro. 2010-01-15 16:01:22 +00:00
Ed Schouten
b7946da96b Build usr.bin/ with WARNS=6 by default.
Also add some missing $FreeBSD$ to keep svn happy.
2010-01-02 10:27:05 +00:00
Marcel Moolenaar
05157fa0a1 s/DT_IA64_PLT_RESERVE/DT_IA_64_PLT_RESERVE/ 2006-01-28 17:58:22 +00:00
Marcel Moolenaar
57668ad84b Know the machines FreeBSD runs on. Print the machine value for
unknown machines.

MFC after: 1 week
2005-12-17 23:24:34 +00:00
Ruslan Ermilov
6c7216df78 Sort sections. 2005-01-18 13:43:56 +00:00
Ruslan Ermilov
a866e17077 Added the EXIT STATUS section where appropriate. 2005-01-17 07:44:44 +00:00
Jake Burkholder
d499047c83 Elf_Phdr.p_type 7 is "PT_TLS". 2004-03-02 14:06:27 +00:00
Jens Schweikhardt
dcae6166e2 Removed another spurious semicolon forgotten in the previous commit. 2003-09-06 11:55:05 +00:00
Jens Schweikhardt
81f8caf7ef 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
2003-09-06 10:55:30 +00:00
Marcel Moolenaar
ac2ded1df3 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.
2003-08-09 01:55:37 +00:00
Ruslan Ermilov
73e57b801f Synchronize usage() and SYNOPSIS, and fix them (flags are not
optional here).  Sort options.  Print the file name on error.
2003-06-28 22:30:46 +00:00
Ruslan Ermilov
f1e65894d2 mdoc(7) police: Revision. 2003-03-03 11:51:30 +00:00
Jacques Vidrine
de8ab39c6a Spellcheck. 2003-02-28 15:01:31 +00:00
David E. O'Brien
b8adbd4e7f Add a man page. 2003-02-03 01:59:27 +00:00
David E. O'Brien
75ca4dcf31 Make WARNS=5 clean even on 64-bit platforms. 2003-02-03 01:30:47 +00:00
David E. O'Brien
36210553da Make WARNS=5 on i386, (WARNS=1 on 64-bit platforms).
Submitted by:	dwmalone (tweaked by me)
2003-02-03 01:22:58 +00:00
David E. O'Brien
0529c56b96 Try to tighten up the types a little bit to help debugging with GDB. 2003-02-02 22:16:05 +00:00
Marcel Moolenaar
5f85bb36ee 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...
2003-01-18 02:33:49 +00:00
David E. O'Brien
3df3bb12fb 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.
2003-01-15 21:24:05 +00:00
David E. O'Brien
9bc01124e7 The defined sh_types's just aren't in consecutive order, so we have to move
away from indexing into an array.
2003-01-15 20:48:56 +00:00
David E. O'Brien
8fe960a125 Add a BSDL'ed util that displays information about ELF files.
This is simular to readelf(1) and objdump(1).

Submitted by:	jake
2003-01-15 18:32:06 +00:00