From: kagel AT quasar DOT bloomberg DOT com Date: Thu, 16 May 1996 09:06:54 -0400 Message-Id: <9605161306.AA04556@quasar.bloomberg.com > To: dj AT delorie DOT com Cc: cjohns AT desertoak DOT awa DOT com DOT au, A DOT APPLEYARD AT fs2 DOT mt DOT umist DOT ac DOT uk, DJGPP AT delorie DOT com In-Reply-To: <199605160312.XAA07094@delorie.com> (dj@delorie.com) Subject: Re: Unused functions Reply-To: kagel AT dg1 DOT bloomberg DOT com Date: Wed, 15 May 1996 23:12:42 -0400 From: dj AT delorie DOT com (DJ Delorie) > Does 'ld' support function level linking ? No. IBM's AIX linker does, but there's a lot of overhead involved. > Would it be a good idea to support function level linking ? Not for V2's libc, since we already manually split up the source files to nearly eliminate unused functions from being linked in in the first place. It's easier to write the code that way than to teach the linker to fix it for you. Most code falls into one of two categories: 1. Part of a library. Manually split the code into many sources once, and every user benefits. 2. Part of an application. Hey, you're going to use them all anyway or you wouldn't have written them, right? BTW one way to eliminate uncalled functions is to keep you granularity as fine as possible, ie put only one function, or a few functions required together, per source file and put everything into a library except main(). In this way the linker CAN filter unreferenced functions for you. Just treat everything as an application specific library. -- Art S. Kagel, kagel AT quasar DOT bloomberg DOT com A proverb is no proverb to you 'till life has illustrated it. -- John Keats