Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site rlgvax.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!zehntel!hplabs!hao!seismo!rlgvax!guy From: guy@rlgvax.UUCP (Guy Harris) Newsgroups: net.unix-wizards Subject: Re: \"ld\" and \".a\" files Message-ID: <364@rlgvax.UUCP> Date: Thu, 17-Jan-85 13:50:09 EST Article-I.D.: rlgvax.364 Posted: Thu Jan 17 13:50:09 1985 Date-Received: Mon, 21-Jan-85 06:24:20 EST References: <7335@brl-tgr.ARPA> Organization: CCI Office Systems Group, Reston, VA Lines: 17 > The manual for the linker "ld" says that the program will search > archive ".a" files for previously undefined global symbols, and > will include any ROUTINES that define such symbols. > > ...The conclusion I reached is that "ld" in fact loads not the > routine but the FILE containing the definition of the global symbol. Most OSes that I know of work that way - object libraries are archives of object modules (an object module being an object file built from one source file) and if a given object module resolves an undefined symbol the whole module, not just the part of the module that resolves the symbol, is included. UNIX is no exception. Perhaps TENEX/TOPS-20 is. I presume the documentation was assuming familiarity with linkers which work the way the UNIX linker does. Guy Harris {seismo,ihnp4,allegra}!rlgvax!guy