home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.fortran
- Path: sparky!uunet!decwrl!borland.com!sjc
- From: sjc@genghis.borland.com (Steve Correll)
- Subject: Re: Size of executables
- Message-ID: <1992Sep9.081925.21564@genghis.borland.com>
- Originator: sjc@genghis.borland.com
- Sender: news@borland.com (News Admin)
- Organization: Borland International
- References: <9209031948.AA10327@ros6.gsfc.nasa.gov> <1992Sep8.141200.12145@puma.ATL.GE.COM>
- Date: Wed, 9 Sep 1992 08:19:25 GMT
- Lines: 29
-
- In article <1992Sep8.141200.12145@puma.ATL.GE.COM> wmitchel@fergie.dnet.ge.com (Bill Mitchell) writes:
- >It would seem there is more than just a question of shared/static
- >libraries involved here. Consider the following two programs:
- ...
- >edgar% f77 -o test1 test1.f
- >test1.f:
- > MAIN:
- >edgar% f77 -o test2 test2.f
- >test2.f:
- > MAIN:
- > matmul:
- > sdot:
- > second:
- >edgar% ls -l
- >total 315
- >-rwxr-xr-x 1 wmitchel 147456 Sep 2 11:20 test1*
- >-rw-r--r-- 1 wmitchel 88 Sep 2 11:21 test1.o
- >-rwxr-xr-x 1 wmitchel 147456 Sep 2 11:21 test2*
- >-rw-r--r-- 1 wmitchel 5236 Sep 2 11:21 test2.o
- >
- >Why are the two executable *exactly* the same size?
-
- One factor is that the "ls" command doesn't give a very accurate indication
- of program size on most Unix systems (for example, the size of the BSS section
- don't affect the size of the .o file at all; and the a.out file size is often
- distorted by padding or alignment of sections). Try the "size" command instead
- if your system provides one (Sun does). On System V there's usually a "dump"
- program with bazillions of options which can tell you the size of the text
- (instructions) and data within a object file.
-