Path: utzoo!utgpu!news-server.csri.toronto.edu!rutgers!rochester!bbn.com!nic!chaos.cs.brandeis.edu!chaos!phils From: phils@chaos.cs.brandeis.edu (Phil Shapiro) Newsgroups: comp.sys.mac.programmer Subject: Re: THINK C linking wish Message-ID: Date: 3 Dec 90 15:22:11 GMT References: <16796@natinst.natinst.com> <109545@convex.convex.com> Sender: @chaos.cs.brandeis.edu Distribution: usa Organization: Symantec Corp. Lines: 25 In-Reply-To: ewright@convex.com's message of 29 Nov 90 23:20:15 GMT In article <109545@convex.convex.com> ewright@convex.com (Edward V. Wright) writes: davoli@natinst.com (Russell Davoli) writes: > >It would be really nice if there was a way to get "smarter" linking >out of THINK C. By this, I mean that the linker includes only the >functions called in the program. As I understand it, presently the >linker will link in all the functions from a file if even one of those >is called. Are you sure about that? I know that isn't true with THINK Pascal, so I would be fairly surprised to find out that is with THINK C. THINK Pascal v3.0's linker "optimizes" on a function by function basis. THINK C v4.0's linker optimizes on a file by file basis. So in C, you can make "link-optimizing" library by placing each family of functions in a seperate .c file (for example, C's ANSI library). -phil -- Phil Shapiro Technical Support Analyst Language Products Group Symantec Corporation Internet: phils@chaos.cs.brandeis.edu