From owner-freebsd-questions@FreeBSD.ORG Thu Jun 5 13:29:48 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 39B281065672 for ; Thu, 5 Jun 2008 13:29:48 +0000 (UTC) (envelope-from thoellri@adobe.com) Received: from exprod6og107.obsmtp.com (exprod6og107.obsmtp.com [64.18.1.208]) by mx1.freebsd.org (Postfix) with ESMTP id 1697F8FC25 for ; Thu, 5 Jun 2008 13:29:45 +0000 (UTC) (envelope-from thoellri@adobe.com) Received: from source ([192.150.8.22]) by exprod6ob107.postini.com ([64.18.5.12]) with SMTP; Thu, 05 Jun 2008 06:29:41 PDT Received: from inner-relay-3.eur.adobe.com (inner-relay-3b [10.128.4.236]) by outbound-smtp-2.corp.adobe.com (8.12.10/8.12.10) with ESMTP id m55DTdE0026363; Thu, 5 Jun 2008 06:29:40 -0700 (PDT) Received: from fe2.corp.adobe.com (fe2.corp.adobe.com [10.8.192.72]) by inner-relay-3.eur.adobe.com (8.12.10/8.12.9) with ESMTP id m55DTbqJ009404; Thu, 5 Jun 2008 06:29:38 -0700 (PDT) Received: from namail2.corp.adobe.com ([10.8.192.64]) by fe2.corp.adobe.com with Microsoft SMTPSVC(6.0.3790.1830); Thu, 5 Jun 2008 06:29:37 -0700 X-MimeOLE: Produced By Microsoft Exchange V6.5 Content-class: urn:content-classes:message MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Date: Thu, 5 Jun 2008 06:29:35 -0700 Message-ID: In-Reply-To: <20080605132106.GA51988@mech-aslap33.men.bris.ac.uk> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: size of executable - g95 vs gfortran42 - shared libs? Thread-Index: AcjHDxCf0kmAlSQ2RG26f5mBEHLd7wAAPt+g References: <20080605132106.GA51988@mech-aslap33.men.bris.ac.uk> From: "Tobias Hoellrich" To: "Anton Shterenlikht" , X-OriginalArrivalTime: 05 Jun 2008 13:29:37.0671 (UTC) FILETIME=[33741970:01C8C710] Cc: Subject: RE: size of executable - g95 vs gfortran42 - shared libs? 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, 05 Jun 2008 13:29:48 -0000 > -----Original Message----- > From: owner-freebsd-questions@freebsd.org=20 > [mailto:owner-freebsd-questions@freebsd.org] On Behalf Of=20 > Anton Shterenlikht > Sent: Thursday, June 05, 2008 7:21 AM > To: freebsd-questions@freebsd.org > Subject: size of executable - g95 vs gfortran42 - shared libs? >=20 > I use two different fortran90 compiler on a simple input file > and get executables which differ in size by almost 3 orders of > magnitude, see below. Is this something to do with the use > of shared libraries? >=20 > % gfortran42 tmp.f90 > % ls -al a.out > -rwxr-xr-x 1 9179 5 Jun 14:15 a.out > % g95 tmp.f90 > % ls -al a.out > -rwxr-xr-x 1 546413 5 Jun 14:15 a.out > % >=20 > The program results seem to be identical. >=20 > many thanks > anton Run "file" and "ldd" on the executables to see the difference: [root@santafe ~]# file `which ls` /bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), for FreeBSD 8.0 (800038), dynamically linked (uses shared libs), FreeBSD-style, stripped [root@santafe ~]# ldd `which ls` /bin/ls: libutil.so.7 =3D> /lib/libutil.so.7 (0x28082000) libncurses.so.7 =3D> /lib/libncurses.so.7 (0x28090000) libc.so.7 =3D> /lib/libc.so.7 (0x280cf000) [root@santafe ~]# Hope this helps Tobias