Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!cmcl2!nrl-cmf!ames!lll-lcc!unisoft!gethen!farren From: farren@gethen.UUCP (Michael J. Farren) Newsgroups: comp.lang.c Subject: Re: MSC Linking and Libraries Message-ID: <371@gethen.UUCP> Date: Sat, 21-Nov-87 14:25:23 EST Article-I.D.: gethen.371 Posted: Sat Nov 21 14:25:23 1987 Date-Received: Tue, 24-Nov-87 04:58:03 EST References: <3195@rosevax.Rosemount.COM> Reply-To: farren@gethen.UUCP (Michael J. Farren) Organization: Sci-Fido - Unix in Oakland Lines: 32 Keywords: MSC richw@rosevax.Rosemount.COM (Rich Wagenknecht) writes: > >1) Does the MSC linker link an entire library to an object file >or does it extract only the functions actually used by the >object code? It extracts only those functions actually used. This, however, can include functions needed by those functions, so it isn't as simple as a one-to-one match. >2) Why is the executable size of program so much larger >than the object file size? Because the object file does not include any of the code for the library functions; this is included later, by the linker, and expands the size significantly. In the case of small programs which use a lot of library functions, the code for the library functions can be massively larger than the code for the program itself. Also, the .EXE file produced by the linker generally has a large amount of initialization data and relocation information not present in the object file. >3) If the MSC linker does link in an entire library are there >programs which will remove unused library functions. Not needed; see #1. -- ---------------- Michael J. Farren "... if the church put in half the time on covetousness unisoft!gethen!farren that it does on lust, this would be a better world ..." gethen!farren@lll-winken.arpa Garrison Keillor, "Lake Wobegon Days"