From owner-freebsd-questions@FreeBSD.ORG Thu Nov 27 07:32:39 2008 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10A5B1065673 for ; Thu, 27 Nov 2008 07:32:39 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from smtp.infracaninophile.co.uk (gate6.infracaninophile.co.uk [IPv6:2001:8b0:151:1::1]) by mx1.freebsd.org (Postfix) with ESMTP id 7DBE28FC16 for ; Thu, 27 Nov 2008 07:32:38 +0000 (UTC) (envelope-from m.seaman@infracaninophile.co.uk) Received: from happy-idiot-talk.infracaninophile.co.uk (localhost [IPv6:::1]) (authenticated bits=0) by smtp.infracaninophile.co.uk (8.14.3/8.14.3) with ESMTP id mAR7WTLJ056489; Thu, 27 Nov 2008 07:32:30 GMT (envelope-from m.seaman@infracaninophile.co.uk) X-DKIM: Sendmail DKIM Filter v2.7.2 smtp.infracaninophile.co.uk mAR7WTLJ056489 DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=infracaninophile.co.uk; s=200708; t=1227771150; bh=U3sREnxh9CAvsq hJ8CKjiWFwH95Kh8ug33lxm2MB8L4=; h=Message-ID:Date:From:MIME-Version: To:CC:Subject:References:In-Reply-To:Content-Type:Cc:Content-Type: Date:From:In-Reply-To:Message-ID:Mime-Version:References:To; z=Mes sage-ID:=20<492E4D07.8030908@infracaninophile.co.uk>|Date:=20Thu,=2 027=20Nov=202008=2007:32:23=20+0000|From:=20Matthew=20Seaman=20|Organization:=20Infracaninophile|User -Agent:=20Thunderbird=202.0.0.18=20(X11/20081125)|MIME-Version:=201 .0|To:=20"Paul=20B.=20Mahol"=20|CC:=20freebsd-que stions@freebsd.org|Subject:=20Re:=20large=20binary,=20why=20not=20s trip=20?|References:=20=09=20<20081116125622.E24752@wojtek.tensor.gdynia.p l>=09=20<20081117172100.GB43367@hub.freebsd.org>=09=20=09=20<200811172106 49.GE63818@hub.freebsd.org>=09=20<49226AFD.6060505@infracaninophile .co.uk>=09=20<492D7E03.3070500@infracaninophile.co.uk>=20<3a142e750 811260901j134e9ff9pa334fc50c52fadd2@mail.gmail.com>|In-Reply-To:=20 <3a142e750811260901j134e9ff9pa334fc50c52fadd2@mail.gmail.com>|X-Eni gmail-Version:=200.95.6|Content-Type:=20multipart/signed=3B=20mical g=3Dpgp-sha256=3B=0D=0A=20protocol=3D"application/pgp-signature"=3B =0D=0A=20boundary=3D"------------enig67C1205D101BFC54F10AA781"; b=D G+MC8MXvlWDujbiCLH3SSANLGKaLSiRVeNfPI1eFHUTX2+Go65yDjrwTmu+5wGJjHvJ F7/AXQv4Ut7EZD5NDMAlDumec97JaV8KagQeW8qyuqdBOZdefEfW81iZi2B+0q6oQ4S j/CoGooBidgV1bTjyNx/75HJNC8IpEEIcumU= Message-ID: <492E4D07.8030908@infracaninophile.co.uk> Date: Thu, 27 Nov 2008 07:32:23 +0000 From: Matthew Seaman Organization: Infracaninophile User-Agent: Thunderbird 2.0.0.18 (X11/20081125) MIME-Version: 1.0 To: "Paul B. Mahol" References: <20081116125622.E24752@wojtek.tensor.gdynia.pl> <20081117172100.GB43367@hub.freebsd.org> <20081117210649.GE63818@hub.freebsd.org> <49226AFD.6060505@infracaninophile.co.uk> <492D7E03.3070500@infracaninophile.co.uk> <3a142e750811260901j134e9ff9pa334fc50c52fadd2@mail.gmail.com> In-Reply-To: <3a142e750811260901j134e9ff9pa334fc50c52fadd2@mail.gmail.com> X-Enigmail-Version: 0.95.6 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="------------enig67C1205D101BFC54F10AA781" X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (smtp.infracaninophile.co.uk [IPv6:::1]); Thu, 27 Nov 2008 07:32:30 +0000 (GMT) X-Virus-Scanned: ClamAV 0.94.1/8685/Thu Nov 27 01:55:04 2008 on happy-idiot-talk.infracaninophile.co.uk X-Virus-Status: Clean X-Spam-Status: No, score=-2.9 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VERIFIED,NO_RELAYS autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on happy-idiot-talk.infracaninophile.co.uk Cc: freebsd-questions@freebsd.org Subject: Re: large binary, why not strip ? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Nov 2008 07:32:39 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enig67C1205D101BFC54F10AA781 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Paul B. Mahol wrote: > On 11/26/08, Matthew Seaman wrote: >> Matthew Seaman wrote: >>> Kris Kennaway wrote: >>> >>>> Bonus points if you come up with a patch to do this: in most cases i= t >>>> will be a simple matter of changing the port's do-install: target to= >>>> use INSTALL_* macros instead of cp/bsdtar etc. This would be a good= >>>> project to get some familiarity with the ports tree. >>> Would it be worthwhile to add a test and warning that all installed >>> binaries >>> have not been stripped to the 'security-check' target in bsd.port.mk?= >>> That's >>> not really what that target was intended for (feeping creaturism aler= t!) >>> but >>> it's the obvious place to put such a test. >>> >>> Probably cleaner to create a whole new target, but that's going to >>> duplicate >>> some code. >>> >>> Hmmmm... I shall work up some patches, probably over the weekend, so >>> there's >>> something substantive to talk about. >> Done: ports/129210 >> >> For the record, I also discovered that, contrary to what I said earlie= r, >> there is apparently one class of binary object that will not work cor= rectly >> if stripped: kernel loadable modules. >=20 > Kernel loadable modules are already stripped (--strip-debug). >=20 KLDs aren't stripped in a way that file(1) recognises: happy-idiot-talk:/boot/kernel:% file if_em.ko=20 if_em.ko: ELF 32-bit LSB shared object, Intel 80386, version 1 (FreeBSD),= dynamically linked, not stripped Unfortunately file(1) seems to be about the only tool available to test a priori whether a binary object is stripped or not. It's possible that objdump(1) or readelf(1) could do a similar thing, but I can't work it out from those man pages. Cheers, Matthew --=20 Dr Matthew J Seaman MA, D.Phil. 7 Priory Courtyard Flat 3 PGP: http://www.infracaninophile.co.uk/pgpkey Ramsgate Kent, CT11 9PW --------------enig67C1205D101BFC54F10AA781 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iEYEAREIAAYFAkkuTQ0ACgkQ8Mjk52CukIxrEwCfaQjjWeZQ/qnGCp81H34gveXt AeIAoJGs+X6HOsYSxypwxTXc8ptXa+ga =NK0p -----END PGP SIGNATURE----- --------------enig67C1205D101BFC54F10AA781--