Commit Graph

37 Commits

Author SHA1 Message Date
Christian Brueffer
9efc7e72bb Limit descriptors and enter capability mode.
Differential:	D1009
Reviewed by:	jonathan, pjd
MFC after:	2 weeks
Relnotes:	yes
2014-11-24 09:31:38 +00:00
Mark Johnston
f4f080c659 Fix a typo.
MFC after:	3 days
2014-09-16 22:26:01 +00:00
Ed Maste
494053f4ee elfdump: Remove extraneous _SUNW_ in reported DT_ names
Sponsored by:	The FreeBSD Foundation
2014-08-21 20:58:43 +00:00
Ed Maste
4d52a0fd97 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
2014-08-21 20:55:10 +00:00
Ed Maste
ee8e9ecaf1 elfdump: use existing ELF constants where available
Sponsored by:	The FreeBSD Foundation
2014-07-31 15:40:03 +00:00
Ed Maste
2d538f8c83 elfdump: add EM_AARCH64 64-bit ARM machine architecture 2014-07-31 15:25:12 +00:00
Andreas Tobler
8edba45283 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
2014-07-26 19:44:45 +00:00
Ed Maste
b385405966 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
2014-07-25 18:20:56 +00:00
Baptiste Daroussin
2b7af31cf5 use .Mt to mark up email addresses consistently (part3)
PR:		191174
Submitted by:	Franco Fichtner  <franco at lastsummer.de>
2014-06-23 08:23:05 +00:00
Marcel Moolenaar
a589e596c0 Don't dump core when the ELF file has no section headers. The ELF
core files created by gcore are among those.
2014-06-19 20:12:28 +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
Justin Hibbits
fee1155508 Add missing EM_PPC64 to e_machine header display.
MFC after:	1 week
2014-01-14 04:28:41 +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
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