Article View: gnu.gcc.help
Article #53393Long executable with math library
From: David Grabiner
Date: Tue, 14 Jan 1992 20:10
Date: Tue, 14 Jan 1992 20:10
17 lines
1430 bytes
1430 bytes
Using gcc 1.36 on a Sun 4, I have a program which is 12K in length and uses one function (anint) from the math library. The .o file is 48K, but when the entire program is compiled with -lm, the executable is 160K, which is still 152K when stripped. As a comparison, cc gives a 32K .o file and a 40K executable. Is gcc including the *entire* math library in the executable, or something similar? And if so, is there any way to get a shorter executable (other than writing the function and not including the library)? I would prefer not to keep a 160K executable around. -- David Grabiner, grabiner@zariski.harvard.edu "We are sorry, but the number you have dialed is imaginary." "Please rotate your phone 90 degrees and try again." Disclaimer: I speak for no one and no one speaks for me.
Technical Details
Message-ID:
<GRABINER.92Jan14151006@zariski.harvard.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!psuvax1!hsdndev!husc-news.harvard.edu!zariski!grabinerShow Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,1b6a7eb3a34a2790,start X-Google-Attributes: gid11318c,public X-Google-ArrivalTime: 1992-01-14 12:25:55 PST Path: arc1-ca.pugleaf.net!sparky!uunet!zaphod.mps.ohio-state.edu!uwm.edu!psuvax1!hsdndev!husc-news.harvard.edu!zariski!grabiner From: grabiner@math.harvard.edu (David Grabiner) Newsgroups: gnu.gcc.help Subject: Long executable with math library Message-ID: <GRABINER.92Jan14151006@zariski.harvard.edu> Date: 14 Jan 92 20:10:16 GMT Distribution: gnu Organization: Harvard University Dept. of Mathematics Lines: 17 Nntp-Posting-Host: zariski.harvard.edu