IEEE 1003.2 (was Re: fixing rm

kai at uicsrd.csrd.uiuc.edu kai at uicsrd.csrd.uiuc.edu
Tue Dec 20 16:21:00 AEST 1988


> In article <14946 at mimsy.UUCP>, chris at mimsy.UUCP (Chris Torek) writes:
> For that matter, why do we need object archives in the first place?
> They are just a hack to save space (and perhaps, but not necessarily,
> time).  How about /lib/libc/*.o?

Object libraries serve other functions as well (for some people).

Unless stored in object libraries, routines that reference each other will
not have their external references resolved correctly unless the object files
are linked in the correct order.  Put them in an library that was processed
by ranlib (or newer versions of ar), and ld handles it okay.  Maybe this is a
problem with ld.

Recursive references between two or more objects?  No matter how you order
the objects, you can forget it without libraries.  Okay, maybe this is
another problem with "ld".

Large numbers of object files?  You've apparently never worked on a program
so huge that */*.o expands to overflow the shell's command line buffer, so
there is absolutely no way to link without storing them all in a library
first.

You have a number of objects and want to test a new version of a single
object?  Well, cc -o testpgm main.o mytest.o mylib/*.o won't work, because
you'll get the original mytest.o as well, causing link errors, however cc -o
testpgm main.o mytest.o -lmylib does work.

Patrick Wolfe  (pat at kai.com, kailand!pat)



More information about the Comp.unix.wizards mailing list