> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On Behalf Of 
> Anton Shterenlikht
> Sent: Thursday, June 05, 2008 7:21 AM
> To: freebsd-questions@freebsd.org
> Subject: size of executable - g95 vs gfortran42 - shared libs?
> 
> 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?
> 
> % gfortran42 tmp.f90
> % ls -al a.out
> -rwxr-xr-x  1 <xxx>  <zzz>    9179  5 Jun 14:15 a.out
> % g95 tmp.f90
> % ls -al a.out
> -rwxr-xr-x  1 <xxx>  <zzz>  546413  5 Jun 14:15 a.out
> %
> 
> The program results seem to be identical.
> 
> many thanks
> anton

Run "file" and "ldd" on the executables to see the difference:

[EMAIL PROTECTED] ~]# 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

[EMAIL PROTECTED] ~]# ldd `which ls`
/bin/ls:
        libutil.so.7 => /lib/libutil.so.7 (0x28082000)
        libncurses.so.7 => /lib/libncurses.so.7 (0x28090000)
        libc.so.7 => /lib/libc.so.7 (0x280cf000)
[EMAIL PROTECTED] ~]#

Hope this helps
  Tobias
_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to