using libraries with ld (1)

Peter DaSilva peter at kitty.UUCP
Sat Aug 10 03:13:43 AEST 1985


> I was under the impression that libraries specified in the way that mylib.a
> is have the entire library linked in rather than just those routines which
> are needed because of undefined identifiers.  Does anyone know if this is
> actually the case?

Not if the library is built right. (speakin in terms of the pdp-11 linker)
Only those object files containing symbols that have been referenced by
the main program or other modules get loaded. Of course with enough cross
references the whole thing CAN get pulled in. There is no difference thet I
know of in the way mylib.a and /usr/lib/foolib.a are treated.



More information about the Comp.unix mailing list