aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/elfdump
Commit message (Collapse)AuthorAgeFilesLines
* elfdump: Move to the toolchain packageLexi Winter2025-09-231-0/+1
| | | | | | MFC after: 1 day Reviewed by: manu, imp, emaste Differential Revision: https://reviews.freebsd.org/D52648
* Remove residual blank line at start of MakefileWarner Losh2024-07-151-1/+0
| | | | | | | This is a residual of the $FreeBSD$ removal. MFC After: 3 days (though I'll just run the command on the branches) Sponsored by: Netflix
* usr.bin: Automated cleanup of cdefs and other formattingWarner Losh2023-11-271-1/+0
| | | | | | | | | | | | | | | | Apply the following automated changes to try to eliminate no-longer-needed sys/cdefs.h includes as well as now-empty blank lines in a row. Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/ Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/ Remove /\n+#if.*\n#endif.*\n+/ Remove /^#if.*\n#endif.*\n/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/ Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/ Sponsored by: Netflix
* Remove $FreeBSD$: two-line nroff patternWarner Losh2023-08-161-2/+0
| | | | Remove /^\.\\"\n\.\\"\s*\$FreeBSD\$$\n/
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-162-2/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* Remove $FreeBSD$: one-line .c patternWarner Losh2023-08-161-2/+0
| | | | Remove /^[\s*]*__FBSDID\("\$FreeBSD\$"\);?\s*\n/
* Mark usage function as __dead2 in programs where it does not returnAlfonso Gregory2023-07-071-1/+1
| | | | | | | | In most cases, usage does not return, so mark them as __dead2. For the cases where they do return, they have not been marked __dead2. Reviewed by: imp Pull Request: https://github.com/freebsd/freebsd-src/pull/735
* spdx: The BSD-2-Clause-FreeBSD identifier is obsolete, drop -FreeBSDWarner Losh2023-05-121-1/+1
| | | | | | | | | The SPDX folks have obsoleted the BSD-2-Clause-FreeBSD identifier. Catch up to that fact and revert to their recommended match of BSD-2-Clause. Discussed with: pfg MFC After: 3 days Sponsored by: Netflix
* Update/fix Makefile.depend for userlandSimon J. Gerraty2023-04-191-1/+1
|
* elfdump: handle small files more gracefullyEric van Gyzen2022-02-171-1/+6
| | | | | | | | | | | | elfdump -E on an empty file would complain "Invalid argument" because it tried to mmap zero bytes. With the -E flag, elfdump should simply exit non-zero. For tiny files, the code would reference off the end of the mapped region. Ensure the file is large enough to contain an ELF header before mapping it. MFC after: 1 week Sponsored by: Dell EMC Isilon
* 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-50/+55
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | 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