summaryrefslogtreecommitdiffstats
path: root/usr.sbin/crunch
Commit message (Collapse)AuthorAgeFilesLines
* crunchgen: Permit use of alternative linkers.pfg2013-02-051-1/+2
| | | | | Submitted by: Pete Chou MFC after: 1 week
* crunchide(1): Put e_shnum into a local variable.pfg2013-02-031-10/+13
| | | | | | | This simplifies the code a bit. Submitted by: Cristoph Mallon MFC after: 2 weeks
* crunchide(1): support non-custom elf object layoutpfg2013-02-031-60/+157
| | | | | | | | | | | | | | | The crunchide utility presumes the last 3 chunks of an ELF object layout are section headers, symbol table, and then string table. However, this is not specified in the ELF standards, and linkers may generate different layouts when doing partial linking (-r). This change is required to build FreeBSD with mclinker or the gold linker. PR: bin/174011 Submitted by: Pete Chou Reviewed by: Cristoph Mallon MFC after: 2 weeks
* crunch: Sync some NetBSD changespfg2013-02-031-0/+2
| | | | | | | Fix a couple of free's in previous commit. Obtained from: NetBSD MFC after: 1 week
* crunch: Sync some NetBSD changespfg2013-02-021-2/+3
| | | | | | Revert a comment that was not supposed to go away. Obtained from: NetBSD
* crunch: Sync some NetBSD changes.pfg2013-02-023-26/+26
| | | | | | | | | | | | | | | | | crunchide: Apr 11, 2009: fix some -Wsign-compare issues. Sep 20, 1999: Free the right thing. crunchgen: Apr 14, 2009: Fix some WARNS=4 issues (-Wshadow -Wcast-qual) Oct 30, 2004: Add (unsigned char) cast to ctype functions Feb 5, 2001: fix nested extern. examples: Aug 30, 2007: NetBSD 36867 - trsp references are deprecated Obtained from: NetBSD MFC after: 1 week
* Disconnect non-MPSAFE PORTALFS from the build in preparation for droppingattilio2012-10-161-1/+1
| | | | | | GIANT from VFS. This is not targeted for MFC.
* Add support for bmake. This includes:marcel2012-10-061-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Don't do upgrade_checks when using bmake. As long as we have WITH_BMAKE, there's a bootstrap complication in ths respect. Avoid it. Make the necessary changes to have upgrade_checks work wth bmake anyway. 2. Remove the use of -E. It's not needed in our build because we use ?= for the respective variables, which means that we'll take the environment value (if any) anyway. 3. Properly declare phony targets as phony as bmake is a lot smarter (and thus agressive) about build avoidance. 4. Make sure CLEANFILES is complete and use it on .NOPATH. bmake is a lot smarter about build avoidance and should not find files we generate in the source tree. We should not have files in the repository we want to generate, but this is an easier way to cross this hurdle. 5. Have behavior under bmake the same as it is under make with respect to halting when sub-commands fail. Add "set -e" to compound commands so that bmake is informed when sub-commands fail. 6. Make sure crunchgen uses the same make as the rest of the build. This is important when the make utility isn't called make (but bmake for example). 7. While here, add support for using MAKEOBJDIR to set the object tree location. It's the second alternative bmake looks for when determining the actual object directory (= .OBJDIR). Submitted by: Simon Gerraty <sjg@juniper.net> Submitted by: John Van Horne <jvanhorne@juniper.net>
* Some amount of style(9)obrien2012-06-273-53/+94
| | | | -- function definitions, header ordering, and $FreeBSD$.
* Ensure crunchen uses the same make binary as the rest of the build.obrien2012-06-251-5/+11
| | | | Submitted by: Simon Gerraty <sjg@juniper.net>
* Remove variables which are initialized but never used thereafter reported by ↵eadler2012-06-191-2/+1
| | | | | | | gcc46 warning Approved by: cperciva MFC After: 3 days
* Fix crunchide on MIPS with other than the O32 ABI.jmallett2012-03-131-1/+2
|
* mdoc: drop redundant .Pp and .LP callsuqs2010-10-081-2/+0
| | | | They have no effect when coming in pairs, or before .Bl/.Bd
* It turns out that TARGET_CPUARCH doesn't buy us much here, if anything, butimp2010-09-131-11/+2
| | | | | | | | | costs us another copy of the transform. Revert it. # Maybe makefile.inc1 should set TARGET_CPUARCH for the cross-tools, but # it doesn't now. That would solve problems in other places too. Submitted by: jmallet@
* Use TARGET_CPUARCH instead of TARGET_ARCH here. Define TARGET_CPUARCHimp2010-09-131-2/+11
| | | | | based on TARGET_ARCH. Use TARGET_ARCH still for a powerpc64 test. Futureproof for coming mipsel/mipseb and arm/armeb rename.
* Fix crunchide to work on sparc64 and perhaps other 64 bit platforms.adrian2010-08-121-1/+6
| | | | | | | | | I used the wrong type when setting st_name in the symbol table entry struct. It's an Elf64_Word which is defined as an unsigned 32 bit int on both 32 and 64 bit platforms. To make things sensible, define some new macros to use as "word" macros and use those, rather than simply using the explicit 32 bit macros.
* Port over changes to the crunch symbol hiding method from NetBSD.adrian2010-08-101-134/+88
| | | | | | | | | | | | The older symbol hiding method breaks for MIPS. This implements symbol hiding through renaming to a symbol name which is highly unlikely to clash. The NetBSD code didn't use byte-swapping macros for endian-awareness; so it didn't work when cross-compiling a MIPS world on i386/amd64. This patch includes those (as best as I could figure what they should be) and has been tested to generate valid MIPS crunch binaries both cross- and native- compiled.
* Teach crunchide(1) about PPC ELF64.nwhitehorn2010-07-102-1/+5
|
* mdoc: move CAVEATS, BUGS and SECURITY CONSIDERATIONS sections to theuqs2010-05-131-16/+16
| | | | | | | | | | | bottom of the manpages and order them consistently. GNU groff doesn't care about the ordering, and doesn't even mention CAVEATS and SECURITY CONSIDERATIONS as common sections and where to put them. Found by: mdocml lint run Reviewed by: ru
* The last big commit: let usr.sbin/ use WARNS=6 by default.ed2010-01-021-0/+2
|
* Remove extra space introduced by the previous commit.trasz2009-12-291-1/+1
| | | | Submitted by: rwatson
* Remove pppd and SLIP-related stuff.trasz2009-12-291-2/+2
|
* Run with -B and just .POSIX.obrien2009-01-311-2/+2
|
* Set .POSIX mode, along with disable parallel mode. Crunchgen parses theobrien2009-01-131-3/+4
| | | | | output from make(1) and its picky what it should look like. Also use make's conditional assignment operator rather than test and set.
* Introduce crunchide to the ELF e_machine MIPS values.obrien2008-09-031-0/+8
|
* Cleanup of userland __P usekevlo2007-11-071-1/+1
|
* Include <stdlib.h> for the right prototype for exit(3).yar2007-10-271-0/+1
|
* Set the program name if the crunched program is selected throughyar2007-10-271-0/+5
| | | | | | | | | | | | argv[1] to mimic crt0 behaviour. Do the job by a direct assignment to __progname in order to stay compatible with NetBSD, whose setprogname() is a deliberate no-op. The reason for this change is that some programs (usually those imported from NetBSD) use getprogname() to distinguish between their aliases. (See pkill aka pgrep for example.) This change can be useful, and applicable, to NetBSD, too.
* Use sizeof() for calculating the buffer size instead of hard-coded values.kevlo2007-03-061-1/+1
|
* Back out half of my previous change to support parallel makes.jb2006-11-271-0/+2
| | | | | The generated Makefile clashes with the src/bin/sh/Makefile, causing it to try to use a rule to build something it doesn't need to.
* Fix another parallel make problem with the generated make file.jb2006-11-241-9/+11
| | | | | | | | | | | | | Define the xxx_OBJPATHS earlier and then use it in the xxx_make target because each obj is actually made through that. This allows the crunch to work with -j32 on sun4v. The makefile generated is still poor, though. It really shouldn't use the general 'make all' to do the submakes in the app directories being crunched because each of those objects is listed as a dependency in the generated crunch makefile. Doing that really requires a unique rule to generate them.
* Add the SUBMAKE_TARGETS (like ppp_make) to the dependency listjb2006-11-221-1/+1
| | | | | | for linking the crunched app so that when a parallel make is run (like -j32 on sun4v), the link waits for the sub-make processes to complete.
* Remove reference to mount_fdescfs.rodrigc2006-11-221-2/+2
| | | | Reminded by: ru
* Markup fixes.ru2006-09-291-2/+3
|
* Push removal of mrouted down to the rest of the tree.bms2006-09-291-1/+1
|
* Remove alpha left-overs.ru2006-08-221-1/+1
|
* Bump .Dd before I get told off.ceri2005-12-231-1/+1
|
* Commands like gmirror, graid3, ... and others which use dlopen() to loadceri2005-12-232-4/+95
| | | | | | | | | | | | | | | | | classes from say, /lib/geom, cannot be statically linked completely. Moreover, those shared objects may require other shared objects (i.e. for geom, libraries like -lmd, -lcrypto). The libs_so extension to crunchgen fixes this by allowing some libraries to be linked in dynamically. This requires that a copy of rtld and the shared libraries be made available to the crunched binary, and so is not suitable for all environments. Crunchgen configurations which do not use the 'libs_so' keyword are unaffected and produce identical binaries with and without this commit. Approved by: murray (mentor, in spirit), jhb In collaboration with: Adrian Steinmann <ast at marabu dot ch> MFC After: 6 weeks
* Make our ELF64 type definitions match standards. In particular thismarcel2005-12-181-4/+4
| | | | | | | | | | | | | means: o Remove Elf64_Quarter, o Redefine Elf64_Half to be 16-bit, o Redefine Elf64_Word to be 32-bit, o Add Elf64_Xword and Elf64_Sxword for 64-bit entities, o Use Elf_Size in MI code to abstract the difference between Elf32_Word and Elf64_Word. o Add Elf_Ssize as the signed counterpart of Elf_Size. MFC after: 2 weeks
* In crunchgen(1), when calling make(1), don't redirect stderr to stdout,ru2005-01-201-1/+1
| | | | | | | just rely on the exit status to detect an error. This makes crunchgen(1) safe to use with certain make(1) debugging flags. MFC after: 1 week
* Start the dreaded NOFOO -> NO_FOO conversion.ru2004-12-211-1/+1
| | | | OK'ed by: core
* For variables that are only checked with defined(), don't provideru2004-10-241-1/+1
| | | | any fake value.
* Fix a 4.X -> 5.X upgrade problem: crunchgen used to emit a line 'MAKE=make'harti2004-08-091-7/+7
| | | | | | | | | | | or 'env MAKEOBJDIRPREFIX=... make' depending on the setting of MAKEOBJDIRPREFIX in the environment. In any case this line kills the original value of ${MAKE}. When during buildworld a new make is built (as is the case during the upgrade) this causes a wrong make to be picked up (the first one in the path). Use the same technique as Makefile.inc1: create a MAKEENV variable and a CRUNCHMAKE that calls ${MAKE} with that MAKEENV prefixed. Use CRUNCHMAKE instead of MAKE throughout the generated makefile. This leaves the original ${MAKE} undisturbed.
* Mechanically kill hard sentence breaks.ru2004-07-021-4/+10
|
* Adjust the system endian and a.out headers to be more MI and cross-buildingobrien2004-06-221-0/+1
| | | | | | friendly. Use the systems headers rather than local versions. Reviewed by: ru
* Tell crunchide to deal with arm elf binaries as well.cognet2004-06-061-0/+4
| | | | Rescue can now be built for arm.
* Include <netinet/in.h> for ntoh*() and hton*() prototypes.stefanf2004-05-241-0/+1
| | | | Approved by: das (mentor)
* Fix a bug that caused i386 to produce broken binaries for big-endianru2003-08-081-16/+16
| | | | | 64-bit platforms. (size_t is 32bit on i386, but Elf_Shdr.sh_size is 64bit on SPARC64.)
* Teach crunchide(1) about PowerPC ELF.obrien2003-07-221-0/+4
| | | | | PR: 54526 Submitted by: Stefan Farfeleder <stefan@fafoe.narf.at>
* Add AMD64 support.peter2003-06-032-1/+5
|
OpenPOWER on IntegriCloud