comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: Why is memory footprint smaller when compiled static?
Date: Mon, 10 Jun 2002 18:51:32 -0500
Date: 2002-06-10T18:51:32-05:00	[thread overview]
Message-ID: <ugaes7s5a8jcc9@corp.supernews.com> (raw)
In-Reply-To: mailman.1023321903.7863.comp.lang.ada@ada.eu.org

Steven Deller wrote in message ...
>When you link statically, just what you need/use is included.  One
>caveat -- libraries, whether C or Ada, come in chunks (called object
>files) that often include many routines, so you get all of them even
>when you just want one.  Normally linkers can't do "dead code
>elimination", though some are getting almost smart enough to do that.


Come now. Janus/Ada's linker has eliminated unused subprograms pretty
much since it was created in the mid-80s. I doubt very much that we were
15 years ahead of the curve there... :-)

I realize that a lot of systems don't do this, and I've never understood
why: it isn't particularly hard nor very expensive, and it can save a
lot of space (it saves nearly 1 megabyte of code size in the Claw
Builder, for example).

           Randy Brukardt






  parent reply	other threads:[~2002-06-10 23:51 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-05 11:37 Why is memory footprint smaller when compiled static? Grein, Christoph
2002-06-05 12:36 ` Preben Randhol
2002-06-05 13:42   ` Mark Johnson
2002-06-06  0:02   ` Steven Deller
2002-06-06 10:35     ` Preben Randhol
2002-06-06 14:26     ` Gautier
2002-06-06 15:08       ` Jean-Marc Bourguet
2002-06-06 15:24         ` Jean-Pierre Rosen
2002-06-06 19:35           ` Jeffrey Carter
2002-06-10 23:51     ` Randy Brukardt [this message]
2002-06-11  0:53       ` Robert A Duff
2002-06-11 16:45         ` Wes Groleau
2002-06-11 17:08           ` Preben Randhol
2002-06-11 19:12             ` Wes Groleau
2002-06-11 21:38               ` Randy Brukardt
2002-06-11 21:32         ` Randy Brukardt
  -- strict thread matches above, loose matches on Subject: below --
2002-06-04 15:14 Preben Randhol
2002-06-04 16:13 ` Mark Johnson
2002-06-04 21:01 ` Florian Weimer
2002-06-04 21:02 ` Florian Weimer
2002-06-04 21:03 ` Florian Weimer
2002-06-05 11:10   ` Preben Randhol
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox