aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/crunch
Commit message (Collapse)AuthorAgeFilesLines
* various: general adoption of SPDX licensing ID tags.Pedro F. Giffuni2017-11-273-3/+10
| | | | | | | | | | | | | | | | | 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
* Remove badsect(8).Konstantin Belousov2017-11-052-2/+3
| | | | | | | | | | | | | | Failure modes of the modern (that is, produced in the last 25 years) hard drives and SSDs made the utility outdated. Since the kernel interface to support it was removed in r324853, cut the userspace remnants as well. Discussed with: bde (who does not like the removal) Sponsored by: The FreeBSD Foundation MFC after: 2 weeks Notes: svn path=/head/; revision=325452
* DIRDEPS_BUILD: Update dependencies.Bryan Drewery2017-10-312-2/+0
| | | | | | | Sponsored by: Dell EMC Isilon Notes: svn path=/head/; revision=325188
* Deorbit catman. The tradeoff of disk for performance has long since tippedGordon Tetlow2017-09-131-1/+1
| | | | | | | | | | | | | in favor of just rendering the manpage instead of relying on pre-formatted catpages. Note, this does not impede the ability to use existing catpages, it just removes the utility to generate them. Reviewed by: imp, allanjude Approved by: emaste (mentor) Differential Revision: https://reviews.freebsd.org/D12317 Notes: svn path=/head/; revision=323550
* crunchgen: quiet -Wmissing-prototypesRyan Libby2017-09-072-17/+4
| | | | | | | | | Reviewed by: emaste (previous version) Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D12107 Notes: svn path=/head/; revision=323276
* Teach crunchide about EM_S390 to make bootstrapping from futureBjoern A. Zeeb2017-01-101-0/+1
| | | | | | | | | | releases easier unless someone will fix the PR properly. MFC after: 3 days PR: 215940 Notes: svn path=/head/; revision=311876
* Show that the crunchgen configuration file name is not optional.Warren Block2017-01-061-3/+3
| | | | | | | | | | PR: 215087 Submitted by: Iblis Lin <iblis@hs.ntnu.edu.tw> MFC after: 1 week Sponsored by: iXsystems Notes: svn path=/head/; revision=311527
* crunchide: report explicit error for combined string tableEd Maste2016-11-171-0/+4
| | | | | | | | | | | | | | | | | Some tools produce objects with a combined strtab and shstrtab. These objects are not supported by crunchide since it rewrites the symtab and strtab to "hide" symbols. This invalidates section header offsets into a combined strtab/shstrtab. In the future we could support these objects (by ensuring that we retain unmodified section name strings in the output .strtab, and then rewriting each section header's sh_name). MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=308772
* crunchide: remove obsolete a.out header and commentEd Maste2016-11-161-2/+1
| | | | | | | | | | crunchide(1) gained ELF support in r39172, and lost the unused a.out and non-functional ECOFF suport in r281655. Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=308734
* crunchgen: do not strip crunched binary (it will be done by install)Ed Maste2016-09-301-2/+0
| | | | | | | | Reviewed by: adrian, imp (earlier) Differential Revision: https://reviews.freebsd.org/D2003 Notes: svn path=/head/; revision=306497
* META_MODE/DIRDEPS_BUILD: Fix various issues with crunch builds.Bryan Drewery2016-09-011-0/+1
| | | | | | | | | | | | | | | | | - DIRDEPS_BUILD: Fix crunchgen builds losing their library dependencies on a nop-rebuild. - META_MODE: Fix not rebuilding various crunch.mk targets if their .meta files warrant a rebuild. They were lacking .meta files previously. This adds .NOMETA to the crunch objects being used since they are already built. Bmake was forcing a rebuild on them since their .meta files were not in the expected place; there is no reason to rebuild them. MFC after: 2 weeks Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=305254
* WITH_AUTO_OBJ: Fix crunchgen builds.Bryan Drewery2016-05-261-1/+6
| | | | | | | | | | | | | | | | | | | | Passing MAKEOBJDIRPREFIX to the main prog build (rescue) would confuse WITH_AUTO_OBJ and cause it to create a recursed object directory that then broke the actual prog build. This is normally not a problem since we do not call 'make -f prog.mk obj' before building anything in it. Crunchgen(1) also assumes that if -o is not passed then if an object directory does not already exist then it should build in the source directories. The normal buildworld process will have already ran 'make obj' in each of the component directories so this is not a problem. With WITH_AUTO_OBJ though this is not the case. So we must tell crunchgen(1) that MK_AUTO_OBJ=yes will create the directory and to not require it be present before generating its Makefile. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=300806
* DIRDEPS_BUILD: Regenerate without local dependencies.Bryan Drewery2016-02-241-2/+0
| | | | | | | | | | | These are no longer needed after the recent 'beforebuild: depend' changes and hooking DIRDEPS_BUILD into a subset of FAST_DEPEND which supports skipping 'make depend'. Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=295989
* crunchide: add RISC-V to supported machine typesEd Maste2015-12-111-0/+4
| | | | | | | | MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=292106
* Fix rescue build after r284356 with STRIP= by using proper STRIPBIN per ↵Bryan Drewery2015-07-281-2/+2
| | | | | | | | | | | | | | | | | build(7). This was causing the following error: rescue sh: rescue: not found *** [rescue] Error code 127 make[1]: stopped in /usr/obj/usr/src/rescue/rescue Sponsored by: EMC / Isilon Storage Division Notes: svn path=/head/; revision=285986
* new dependsSimon J. Gerraty2015-06-161-1/+0
| | | | Notes: svn path=/head/; revision=284481
* Change -Wl,-r back to -r so gcc doesn't pass --relax to the linker on someTijl Coosemans2015-06-151-1/+1
| | | | | | | | | architectures. PR: 200881 Notes: svn path=/head/; revision=284422
* Tell the compiler that -dc and -r are linker flags.Tijl Coosemans2015-06-141-1/+1
| | | | | | | Reviewed by: adrian Notes: svn path=/head/; revision=284382
* Fix typo - this upsets llvm/gcc-4.9, but not gcc-4.2 for some reason.Adrian Chadd2015-06-141-1/+1
| | | | Notes: svn path=/head/; revision=284363
* Fix up crunchgen binary generation to work with external cross-buildAdrian Chadd2015-06-131-2/+3
| | | | | | | | | | | | | | | | tools. * Allow STRIP to be overridden by the environment * Use CC to tie things together, not LD Tested: * i386, mips32 Submitted by: kan Notes: svn path=/head/; revision=284356
* Add META_MODE support.Simon J. Gerraty2015-06-132-0/+39
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | 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-082-4/+0
| | | | | | | | Notes: svn path=/projects/bmake/; revision=284172
| * Merge sync of headSimon J. Gerraty2015-05-275-259/+27
| |\ | |/ |/| | | Notes: svn path=/projects/bmake/; revision=283595
| * Merge from head@274682Simon J. Gerraty2014-11-192-4/+0
| |\ | | | | | | | | | Notes: svn path=/projects/bmake/; revision=274683
| * \ Merge head from 7/28Simon J. Gerraty2014-08-196-12/+12
| |\ \ | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=270164
| * | | Updated dependenciesSimon J. Gerraty2014-05-162-2/+0
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=266219
| * | | Updated dependenciesSimon J. Gerraty2014-05-102-0/+4
| | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265802
| * | | Merge headSimon J. Gerraty2014-04-281-1/+1
| |\ \ \ | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=265044
| * | | | Updated dependenciesSimon J. Gerraty2013-03-112-0/+2
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=248169
| * | | | Updated dependenciesSimon J. Gerraty2013-02-162-4/+0
| | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246868
| * | | | Sync with HEAD.David E. O'Brien2013-02-083-82/+186
| |\ \ \ \ | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=246555
| * \ \ \ \ Sync from headSimon J. Gerraty2012-11-045-56/+96
| |\ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=242545
| * | | | | | Sync FreeBSD's bmake branch with Juniper's internal bmake branch.Marcel Moolenaar2012-08-223-3/+43
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Requested by: Simon Gerraty <sjg@juniper.net> Notes: svn path=/projects/bmake/; revision=239572
| * | | | | | MFC: r237574: crunchen uses the same make binary as the rest of the buildDavid E. O'Brien2012-06-251-5/+11
| |\ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/projects/bmake/; revision=237575
* | | | | | | | crunchide: remove EOL whitespaceEd Maste2015-05-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Notes: svn path=/head/; revision=282824
* | | | | | | | crunchide: Restore local EM_AARCH64 constant for bootstrappingEd Maste2015-04-301-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Most of the EM_* constants are available in all supported host branches, but EM_AARCH64 was added relatively recently. Add it back to fix building HEAD on 10.x. Noticed by: adrian, jmallett Notes: svn path=/head/; revision=282291
* | | | | | | | crunchide: add basic string table sanity checksEd Maste2015-04-281-6/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Reported by: Coverity Scan CID: 978805, 980919 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=282144
* | | | | | | | crunchide: Remove local EM_* ELF definitions provided by system ELF headersEd Maste2015-04-201-24/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Suggested by: imp (in review D2314) Notes: svn path=/head/; revision=281781
* | | | | | | | crunchide: always include both 32- and 64-bit ELF supportEd Maste2015-04-182-13/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This avoids the need to build a target-specific crunchide for cross- uilds. Differential Revision: https://reviews.freebsd.org/D2314 Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=281674
* | | | | | | | crunchide: remove unused a.out and non-functional ECOFF supportEd Maste2015-04-174-217/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Differential Revision: https://reviews.freebsd.org/D2311 Reviewed by: imp Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=281655
* | | | | | | | crunchide: arm64 supportEd Maste2015-03-271-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: andrew@ Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=280769
* | | | | | | | crunchide: Correct 64-bit section header offsetEd Maste2015-01-161-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For 64-bit binaries the Elf_Ehdr e_shoff is at offset 40, not 44. Instead of using an incorrect hardcoded offset, let the compiler figure it out for us with offsetof(). Differential Revision: https://reviews.freebsd.org/D1543 MFC after: 1 week Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=277259
* | | | | | | | Add support to crunchide for handling AArch64 (arm64) ELF files.Andrew Turner2015-01-061-0/+4
| |_|_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sponsored by: The FreeBSD Foundation Notes: svn path=/head/; revision=276764
* | | | | | | Revert r267233 for now. PIE support needs to be reworked.Bryan Drewery2014-08-192-4/+0
| |_|_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. 50+% of NO_PIE use is fixed by adding -fPIC to INTERNALLIB and other build-only utility libraries. 2. Another 40% is fixed by generating _pic.a variants of various libraries. 3. Some of the NO_PIE use is a bit absurd as it is disabling PIE (and ASLR) where it never would work anyhow, such as csu or loader. This suggests there may be better ways of adding support to the tree. Many of these cases can be fixed such that -fPIE will work but there is really no reason to have it in those cases. 4. Some of the uses are working around hacks done to some Makefiles that are really building libraries but have been using bsd.prog.mk because the code is cleaner. Had they been using bsd.lib.mk then NO_PIE would not have been needed. We likely do want to enable PIE by default (opt-out) for non-tree consumers (such as ports). For in-tree though we probably want to only enable PIE (opt-in) for common attack targets such as remote service daemons and setuid utilities. This is also a great performance compromise since ASLR is expected to reduce performance. As such it does not make sense to enable it in all utilities such as ls(1) that have little benefit to having it enabled. Reported by: kib Notes: svn path=/head/; revision=270168
* | | | | | Remove ia64.Marcel Moolenaar2014-07-072-7/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This includes: o All directories named *ia64* o All files named *ia64* o All ia64-specific code guarded by __ia64__ o All ia64-specific makefile logic o Mention of ia64 in comments and documentation This excludes: o Everything under contrib/ o Everything under crypto/ o sys/xen/interface o sys/sys/elf_common.h Discussed at: BSDcan Notes: svn path=/head/; revision=268351
* | | | | | use .Mt to mark up email addresses consistently (part2)Baptiste Daroussin2014-06-202-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | PR: 191174 Submitted by: Franco Fichtner <franco@lastsummer.de> Notes: svn path=/head/; revision=267668
* | | | | | In preparation for ASLR [1] support add WITH_PIE to support building with -fPIE.Bryan Drewery2014-06-082-0/+4
| |_|_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is currently an opt-in build flag. Once ASLR support is ready and stable it should changed to opt-out and be enabled by default along with ASLR. Each application Makefile uses opt-out to ensure that ASLR will be enabled by default in new directories when the system is compiled with PIE/ASLR. [2] Mark known build failures as NO_PIE for now. The only known runtime failure was rtld. [1] http://www.bsdcan.org/2014/schedule/events/452.en.html Submitted by: Shawn Webb <lattera@gmail.com> Discussed between: des@ and Shawn Webb [2] Notes: svn path=/head/; revision=267233
* | | | | NO_MAN= has been deprecated in favor of MAN= for some time, go aheadWarner Losh2014-04-131-1/+1
| |_|_|/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | and finish the job. ncurses is now the only Makefile in the tree that uses it since it wasn't a simple mechanical change, and will be addressed in a future commit. Notes: svn path=/head/; revision=264400
* | | | crunchgen: Permit use of alternative linkers.Pedro F. Giffuni2013-02-051-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Submitted by: Pete Chou MFC after: 1 week Notes: svn path=/head/; revision=246346
* | | | crunchide(1): Put e_shnum into a local variable.Pedro F. Giffuni2013-02-031-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This simplifies the code a bit. Submitted by: Cristoph Mallon MFC after: 2 weeks Notes: svn path=/head/; revision=246298