From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,79b248c1cf206957 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-10 16:51:36 PST Path: archiver1.google.com!news1.google.com!sn-xit-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Why is memory footprint smaller when compiled static? Date: Mon, 10 Jun 2002 18:51:32 -0500 Organization: Posted via Supernews, http://www.supernews.com Message-ID: References: X-Newsreader: Microsoft Outlook Express 4.72.3612.1700 X-MimeOLE: Produced By Microsoft MimeOLE V4.72.3719.2500 X-Complaints-To: newsabuse@supernews.com Xref: archiver1.google.com comp.lang.ada:25711 Date: 2002-06-10T18:51:32-05:00 List-Id: 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