libraries

Bennet Yee bsy at PLAY.MACH.CS.CMU.EDU
Wed Dec 21 12:04:28 AEST 1988


In article <15080 at mimsy.UUCP> chris at mimsy.UUCP (Chris Torek) writes:
]
]>In article <14946 at mimsy.UUCP> I suggested, half kidding:
]>>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?
]
]In article <1269 at nusdhub.UUCP> rwhite at nusdhub.UUCP (Robert C. White Jr.)
]writes:
]>Wrong! cammel breath ;-)
]>
]>The *proper* use of object libraries is to *organize* your objects into
]>a usefull search order.
]
]You might try reading the article to which you are responding, and then
]thinking about it.%  A Unix `.a' `library' file is simply a file containing
]other files, plus (depending on your system) a symbol table (in the
]`sub-file' __.SYMDEF).  Now then, what is a Unix directory?
]
]If your answer was `a file containing other files', congratulations.
]
]Now, aside from the actual implementation, what is the difference between
]a library file that contains other files and a library directory that
]contains other files?
]
]If your answer was `none', congratulations again.
]

This is not quite right.  The difference is that .a files impose an order to
the the contents which is not present in normal directories.  In particular,
the version of _cleanup that you load can come from either findiop.o or
fakcu.o, so ordering is indeed important.  Of course, having
/lib/libc/{*.o,__.SYMDEF} can still work, except that you'd either impose
the order via the contents of __.SYMDEF or another file.

-bsy
-- 
Internet:  bsy at cs.cmu.edu		Bitnet:	 bsy%cs.cmu.edu%smtp at interbit
CSnet:     bsy%cs.cmu.edu at relay.cs.net	Uucp:    ...!seismo!cs.cmu.edu!bsy
USPS:      Bennet Yee, CS Dept, CMU, Pittsburgh, PA 15213-3890
Voice:     (412) 268-7571
-- 



More information about the Comp.unix.wizards mailing list