\"ld\" and \".a\" files
Guy Harris
guy at rlgvax.UUCP
Fri Jan 18 04:50:09 AEST 1985
> 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
More information about the Comp.unix.wizards
mailing list