summaryrefslogtreecommitdiff
path: root/usr.bin/elfdump
Commit message (Collapse)AuthorAgeFilesLines
* elfdump: use designated array initialization for note typesEd Maste2019-01-311-3/+7
| | | | | | | | | | | | This ensures the note type name is in the correct slot. PR: 228290 Submitted by: kib MFC with: 343610 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=343613
* elfdump: fix build after r343610Ed Maste2019-01-311-0/+2
| | | | | | | | | | One patch hunk did not survive the trip from git to svn. PR: 228290 MFC with: r343610 Notes: svn path=/head/; revision=343611
* elfdump: include note type namesEd Maste2019-01-311-1/+11
| | | | | | | | | | | Based on a patch submitted by Dan McGregor. PR: 228290 MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=343610
* elfdump: whitespace fixup in advance of other changesEd Maste2019-01-311-4/+4
| | | | Notes: svn path=/head/; revision=343609
* elfdump: Add -E to test if a file is an ELF binary.Brooks Davis2018-11-052-6/+21
| | | | | | | | | | | | | This is intended to replace potentially unreliable checks like: file -b $1 | grep -q '^ELF ..-bit .SB executable' Reviewed by: emaste Sponsored by: DARPA, AFRL Differential Revision: https://reviews.freebsd.org/D15971 Notes: svn path=/head/; revision=340169
* capsicum: use a new capsicum helpers in toolsMariusz Zaborski2018-11-041-3/+3
| | | | | | | Use caph_{rights,ioctls,fcntls}_limit to simplify the code. Notes: svn path=/head/; revision=340138
* Convert `cap_enter() < 0 && errno != ENOSYS` to `caph_enter() < 0`.Mariusz Zaborski2018-06-191-1/+1
| | | | | | | No functional change intended. Notes: svn path=/head/; revision=335395
* elfdump: chase ABI tag note name change from r232832Ed Maste2018-05-301-1/+1
| | | | | | | | | | | | | | | r232832 changed the ABI tag note name from .note.ABI-tag to .note.tag. Follow suit in elfdump. Elfdump's note parsing is very basic and should be significantly reworked, but for now just restore the broken functionality. PR: 228290 Submitted by: martin at lispworks.com MFC after: 1 week Notes: svn path=/head/; revision=334363
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-271-0/+2
| | | | | | | | | | | | | | | | | Mainly focus on files that use BSD 2-Clause license, however the tool I was using misidentified many licenses so this was mostly a manual - error prone - task. The Software Package Data Exchange (SPDX) group provides a specification to make it easier for automated tools to detect and summarize well known opensource licenses. We are gradually adopting the specification, noting that the tags are considered only advisory and do not, in any way, superceed or replace the license texts. No functional change intended. Notes: svn path=/head/; revision=326276
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-311-1/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2016-11-131-0/+1
| | | | | | | | MFC after: 2 weeks Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=308606
* elfdump: correct DT_AUXILIARY / DT_USED / DT_FILTER definitionsEd Maste2016-10-171-3/+3
| | | | | | | | | | | | r109332 introduced these three as DT_SUNW_*. Update to the correct names already used elsewhere in FreeBSD and the Sun "Linker and Libraries Guide" MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=307520
* Remove the duplicated code using Capsicum helpers.Mariusz Zaborski2016-10-071-10/+6
| | | | | | | | Reviewed by: cem, ed, bapt, emaste Differential Revision https://reviews.freebsd.org/D8140 Notes: svn path=/head/; revision=306813
* elfdump: limit STDIN to no rights rather than closing itEd Maste2016-09-201-1/+1
| | | | | | | | | | | | Closing stdin/stdout/stderr is often a bad idea as a future open() can end up with its fd. Leave it open and limit it to no rights instead. Reviewed by: cem Differential Revision: https://reviews.freebsd.org/D7984 Notes: svn path=/head/; revision=306056
* elfdump: adjust stdout/stderr capabilitiesEd Maste2016-09-181-5/+9
| | | | | | | | | | | | | | | | stdio uses fstat and the TIOCGETA ioctl. Also collapse the cap_rights_limit and new cap_ioctls_limit calls into one if statement. Errors here are not actionable by the user and distinguishing stdout from stderr doesn't really have value. Reported by: kib Reviewed by: allanjude, bapt MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D7944 Notes: svn path=/head/; revision=305951
* elfdump: handle STT_SPARC_REGISTEREd Maste2016-01-251-4/+24
| | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=294699
* Rename ELFOSABI_SYSV to ELFOSABI_NONE to match current specEd Maste2015-09-241-1/+1
| | | | | | | | | | | 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 Notes: svn path=/head/; revision=288194
* elfdump: report MIPS ELF section type SHT_MIPS_REGINFOEd Maste2015-09-231-0/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=288138
* elfdump: report MIPS-specific section type SHT_MIPS_ABIFLAGSEd Maste2015-09-221-0/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=288083
* Add RISC-V ELF machine type definitionEd Maste2015-07-241-0/+1
| | | | | | | | | | EM_RISCV is now officially registered as e_machine 243. MFC after: 1 month Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=285841
* Add META_MODE support.Simon J. Gerraty2015-06-131-0/+18
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | Off by default, build behaves normally. WITH_META_MODE we get auto objdir creation, the ability to start build from anywhere in the tree. Still need to add real targets under targets/ to build packages. Differential Revision: D2796 Reviewed by: brooks imp Notes: svn path=/head/; revision=284345
| * dirdeps.mk now sets DEP_RELDIRSimon J. Gerraty2015-06-081-2/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-271-0/+19
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-192-102/+105
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * \ Merge head from 7/28Simon J. Gerraty2014-08-192-48/+117
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | | Updated dependenciesSimon J. Gerraty2014-05-161-1/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | | Updated dependenciesSimon J. Gerraty2014-05-101-0/+2
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | | Merge from headSimon J. Gerraty2014-05-081-8/+35
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265720
| * \ \ \ Merge headSimon J. Gerraty2014-04-281-0/+1
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * | | | | Updated dependenciesSimon J. Gerraty2013-03-111-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | | | Updated dependenciesSimon J. Gerraty2013-02-161-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | | | Sync from headSimon J. Gerraty2012-11-041-53/+58
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-221-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
* | | | | | | Add ELF machine EM_IAMCU, 32-bit Intel MCUEd Maste2015-05-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It is e_machine 6, which was previously reserved for 486. Notes: svn path=/head/; revision=282916
* | | | | | | Limit descriptors and enter capability mode.Christian Brueffer2014-11-241-0/+18
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Differential: D1009 Reviewed by: jonathan, pjd MFC after: 2 weeks Relnotes: yes Notes: svn path=/head/; revision=274960
* | | | | | Fix a typo.Mark Johnston2014-09-161-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC after: 3 days Notes: svn path=/head/; revision=271692
* | | | | | elfdump: Remove extraneous _SUNW_ in reported DT_ namesEd Maste2014-08-211-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=270304
* | | | | | Rename DT_FEATURE_1 to DT_FEATUREEd Maste2014-08-211-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=270303
* | | | | | elfdump: use existing ELF constants where availableEd Maste2014-07-311-101/+103
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=269338
* | | | | | elfdump: add EM_AARCH64 64-bit ARM machine architectureEd Maste2014-07-311-0/+1
| |_|_|_|/ |/| | | | | | | | | | | | | | Notes: svn path=/head/; revision=269337
* | | | | Further improvements on elfdump, to follow up r269092:Andreas Tobler2014-07-261-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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 Notes: svn path=/head/; revision=269143
* | | | | elfdump: Improve section type reportingEd Maste2014-07-251-35/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=269092
* | | | | use .Mt to mark up email addresses consistently (part3)Baptiste Daroussin2014-06-231-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco at lastsummer.de> Notes: svn path=/head/; revision=267773
* | | | | Don't dump core when the ELF file has no section headers. The ELFMarcel Moolenaar2014-06-191-9/+24
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | core files created by gcore are among those. Notes: svn path=/head/; revision=267649
* | | | Handle ELF files with 65280 or more sectionsEd Maste2014-05-071-8/+35
| |_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 Notes: svn path=/head/; revision=265613
* | | Add missing EM_PPC64 to e_machine header display.Justin Hibbits2014-01-141-0/+1
| |/ |/| | | | | | | | | | | MFC after: 1 week Notes: svn path=/head/; revision=260621
* | More -Wmissing-variable-declarations fixes.Ed Schouten2012-10-191-53/+58
|/ | | | | | | | | | | | | | | | | | | 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'. Notes: svn path=/head/; revision=241737
* Don't extract the n_type value from the elf header, since it is never usedEitan Adler2012-02-161-2/+0
| | | | | | | | | | | Fix warning when compiling with gcc46: variable 'type' set but not used Approved by: cperciva MFC after: 3 days Notes: svn path=/head/; revision=231815
* o Use C99 designated initializer to properly handle ELFOSABI_STANDALONE.Marcel Moolenaar2011-10-161-6/+7
| | | | | | | | o In elf_get_byte(), cast through uint8_t and not char to avoid sign extension. Notes: svn path=/head/; revision=226434
* Teach elfdump(1) about the SUNW_dof section.Rui Paulo2010-08-111-0/+1
| | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=211188