From owner-freebsd-hackers@FreeBSD.ORG Tue Dec 20 15:28:59 2005 Return-Path: X-Original-To: freebsd-hackers@freebsd.org Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6D6CB16A41F for ; Tue, 20 Dec 2005 15:28:59 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from speedfactory.net (mail6.speedfactory.net [66.23.216.219]) by mx1.FreeBSD.org (Postfix) with ESMTP id ACE7543D49 for ; Tue, 20 Dec 2005 15:28:58 +0000 (GMT) (envelope-from jhb@freebsd.org) Received: from server.baldwin.cx (unverified [66.23.211.162]) by speedfactory.net (SurgeMail 3.5b3) with ESMTP id 4212014 for multiple; Tue, 20 Dec 2005 10:27:06 -0500 Received: from localhost (john@localhost [127.0.0.1]) by server.baldwin.cx (8.13.4/8.13.4) with ESMTP id jBKFSsIJ006642; Tue, 20 Dec 2005 10:28:55 -0500 (EST) (envelope-from jhb@freebsd.org) From: John Baldwin To: freebsd-hackers@freebsd.org Date: Tue, 20 Dec 2005 10:29:27 -0500 User-Agent: KMail/1.8.2 References: <20051220114121.GA58620@submonkey.net> In-Reply-To: <20051220114121.GA58620@submonkey.net> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-6" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200512201029.28699.jhb@freebsd.org> X-Virus-Scanned: ClamAV version 0.87.1, clamav-milter version 0.87 on server.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.4 required=4.2 tests=ALL_TRUSTED autolearn=failed version=3.1.0 X-Spam-Checker-Version: SpamAssassin 3.1.0 (2005-09-13) on server.baldwin.cx X-Server: High Performance Mail Server - http://surgemail.com r=1653887525 Cc: Ceri Davies Subject: Re: Mostly static binaries with crunchgen X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 20 Dec 2005 15:28:59 -0000 On Tuesday 20 December 2005 06:41 am, Ceri Davies wrote: > Adrian Steinmann's talk at EuroBSDcon regarding a single user SSH daemon > for rescue purposes highlighted an interesting point regarding some > binaries. The GEOM userland binaries such as gmirror, gstripe, etc. use > dlopen() to load classes from /lib/geom and therefore cannot be > statically linked and, by extension, cannot be crunched with crunchgen. > > Adrian mentioned that it would be useful if crunchgen(1) supported > "mostly static" binaries; i.e., a libs_so extension to crunchgen which > would allow these binaries to be crunched, simply requiring then that > rtld and the libraries be made available on the memory disk. This > allows those of us who use GEOM classes to make a small rescue disk. > > I started to add this to crunchgen on the way home, and have worked with > Adrian to finish it off. The patch is attached. It simply adds a > "libs_so" keyword which specifies libraries that will be linked > statically; all current config files continue to produce the same code > as they did before. > > I'd like to commit this with a 6 week MFC period or so, but my mentor is > currently busy. Could someone else please take this up? I don't think you should change TORTIOUS to TORTUOUS in the license. Reading license disclaimers may indeed be tortuous, but tortious is an actual legal term, not a misspelling. It comes from the root word 'tort' which is a legal word for 'sue' (basically). The other concern is does this force the entire crunch to require a working rtld now? If so, that would mean that this wouldn't be appropriate for something such as /rescue. If there were a way to statically link rtld into the crunch itself that would probably be ideal, but I'm not sure that is possible. -- John Baldwin <>< http://www.FreeBSD.org/~jhb/ "Power Users Use the Power to Serve" = http://www.FreeBSD.org