public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
From: James Nickson <jaynicks@earthlink.net>
To: "Nelson H. F. Beebe" <beebe@math.utah.edu>,gcc-help@gcc.gnu.org
Cc: beebe@math.utah.edu
Subject: Re: gcc and small command line tasks
Date: Fri, 12 Aug 2005 16:07:00 -0000	[thread overview]
Message-ID: <3.0.3.32.20050812120923.006bc910@pop.earthlink.net> (raw)
In-Reply-To: <CMM.0.94.0.1123850746.beebe@psi.math.utah.edu>

Thank you Dr. Beebe, got it in one.

I did not think so much  as 400K would be needed for a printf (laughing at
myself again).

Thanks all,

Jay

At 06:45 AM 8/12/05 -0600, Nelson H. F. Beebe wrote:
>James Nickson <jaynicks@earthlink.net> asks why a hello-world test
>produced a 471K executable program.
>
>I suspect that what Jack was seeing in the simple hello.c test is the
>difference between static and dynamic linking.  
>
>For example, on Sun Solaris 8:
>
>	% gcc -o hello hello.c
>	% ls -l hello
>	-rwxrwxr-x  1 beebe staff 6196 Aug 12 06:38 hello
>
>	% gcc -static -o hello hello.c
>	% ls -l hello
>	-rwxrwxr-x  1 beebe staff 363296 Aug 12 06:39 hello
>
>While dynamic linking is the default on all modern operating systems,
>there are cases (e.g., CD-ROM distribution of software and standalone
>boot and rescue disks) where static linking is required to avoid
>dependencies on shared libraries that might be in different locations
>on some remote system than on the system where the executable was
>built, or might be corrupted (consider what happens to your Unix
>system if /lib/libc.so.1 develops a bad disk block: virtually nothing
>can run).
>
>
>---------------------------------------------------------------------------
----
>- Nelson H. F. Beebe                    Tel: +1 801 581 5254
   -
>- University of Utah                    FAX: +1 801 581 4148
   -
>- Department of Mathematics, 110 LCB    Internet e-mail:
beebe@math.utah.edu  -
>- 155 S 1400 E RM 233                       beebe@acm.org
beebe@computer.org -
>- Salt Lake City, UT 84112-0090, USA    URL:
http://www.math.utah.edu/~beebe  -
>---------------------------------------------------------------------------
----
>
=============================================
James Nickson                                  jaynicks@lccdigital.com
19 O.Cheq.Nk.Rd., Wellfleet, MA                      508.349.2422

  reply	other threads:[~2005-08-12 16:07 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-08-12 12:45 Nelson H. F. Beebe
2005-08-12 16:07 ` James Nickson [this message]
  -- strict thread matches above, loose matches on Subject: below --
2005-08-12 20:45 Meissner, Michael
2005-08-12 12:32 James Nickson
2005-08-11 15:11 patriciak784-gccmainling
2005-08-11 13:31 James Nickson
2005-08-11 13:51 ` Arturas Moskvinas

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=3.0.3.32.20050812120923.006bc910@pop.earthlink.net \
    --to=jaynicks@earthlink.net \
    --cc=beebe@math.utah.edu \
    --cc=gcc-help@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).