Question about linking files

RAMontante bobmon at iuvax.cs.indiana.edu
Sun Mar 26 14:52:31 AEST 1989


Hey, gurus and standards freekz...

A question is going around comp.sys.ibm.pc just now, to wit:  somebody has
noticed that (TurboC's) linker links all the routines in a file into his
object file, whether a particular routine is actually called or not.  This
bothers him, because the resulting executable is larger than it really needs
to be.

Among the flurry of LIBrarian tricks to defeat this, a couple of people are
saying that this isn't (TurobC/MSC/whoever)'s fault, because C requires that
all routines (all symbols, maybe?) in a file be linked in if any of them are.

Are there any nuggets of correctness in all this?  Would someone care to
shine some light on it all?

(disclaimer:  I may have oversimplified the discussion.  If you have a good
answer, it's probably worth crossposting to comp.sys.ibm.pc.)



More information about the Comp.lang.c mailing list