From owner-freebsd-hackers@FreeBSD.ORG Wed Feb 15 19:41:46 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 600891065670 for ; Wed, 15 Feb 2012 19:41:46 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id 29BFA8FC1A for ; Wed, 15 Feb 2012 19:41:45 +0000 (UTC) Received: from pps.filterd (ltcfislmsgpa02 [127.0.0.1]) by ltcfislmsgpa02.fnfis.com (8.14.4/8.14.4) with SMTP id q1FJRARn022425; Wed, 15 Feb 2012 13:41:45 -0600 Received: from smtp.fisglobal.com ([10.132.206.17]) by ltcfislmsgpa02.fnfis.com with ESMTP id 130j8gr6pd-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Wed, 15 Feb 2012 13:41:45 -0600 Received: from dtwin (10.14.152.15) by smtp.fisglobal.com (10.132.206.17) with Microsoft SMTP Server (TLS) id 14.1.323.3; Wed, 15 Feb 2012 13:41:44 -0600 From: Devin Teske To: "'Ansar Mohammed'" , References: In-Reply-To: Date: Wed, 15 Feb 2012 11:41:52 -0800 Message-ID: <0a7601ccec19$de715a90$9b540fb0$@fisglobal.com> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit X-Mailer: Microsoft Outlook 14.0 Thread-Index: AQE+9AuCztIL1YQbCDOUpC5H/ta/IJdaSp4g Content-Language: en-us X-Originating-IP: [10.14.152.15] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.6.7361, 1.0.260, 0.0.0000 definitions=2012-02-15_05:2012-02-15, 2012-02-15, 1970-01-01 signatures=0 Cc: Subject: RE: nologin size 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: Wed, 15 Feb 2012 19:41:46 -0000 > -----Original Message----- > From: owner-freebsd-hackers@freebsd.org [mailto:owner-freebsd- > hackers@freebsd.org] On Behalf Of Ansar Mohammed > Sent: Wednesday, February 15, 2012 11:29 AM > To: freebsd-hackers@freebsd.org > Subject: nologin size > > Hello all, > I am trying to build a minimal size FreeBSD 9 installation and I > noticed that the size of nologin is almost 200k. > I built FreeBSD from source so I checked the distribution, and it's also 200k. > So I went back to the source and just compiled nologin.c and it came up to 5k. > > Can anyone explain why this executable is so large? Dynamic versus static executable. 200K version: % ldd /usr/sbin/nologin ldd: /usr/sbin/nologin: not a dynamic ELF executable 5K version (produced manually by compiling/linking oneself -- shown below): % cd /usr/src/usr.sbin/nologin % sudo cc -c nologin.c -o nologin.o % sudo cc -g nologin.o -o nologin % ldd nologin nologin: libc.so.7 => /lib/libc.so.7 (0x28090000) -- Devin _____________ The information contained in this message is proprietary and/or confidential. If you are not the intended recipient, please: (i) delete the message and all copies; (ii) do not disclose, distribute or use the message in any manner; and (iii) notify the sender immediately. In addition, please be aware that any message addressed to our domain is subject to archiving and review by persons other than the intended recipient. Thank you.