home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / lang / fortran / 3482 < prev    next >
Encoding:
Text File  |  1992-09-08  |  1.6 KB  |  42 lines

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