Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!mailrus!tut.cis.ohio-state.edu!rutgers!rochester!pt.cs.cmu.edu!PLAY.MACH.CS.CMU.EDU!bsy From: bsy@PLAY.MACH.CS.CMU.EDU (Bennet Yee) Newsgroups: comp.unix.wizards Subject: Re: libraries Message-ID: <3919@pt.cs.cmu.edu> Date: 21 Dec 88 02:04:28 GMT References: <14946@mimsy.UUCP> <1269@nusdhub.UUCP> <15080@mimsy.UUCP> Organization: Cranberry Melon Lines: 40 In article <15080@mimsy.UUCP> chris@mimsy.UUCP (Chris Torek) writes: ] ]>In article <14946@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@nusdhub.UUCP> rwhite@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@cs.cmu.edu Bitnet: bsy%cs.cmu.edu%smtp@interbit CSnet: bsy%cs.cmu.edu@relay.cs.net Uucp: ...!seismo!cs.cmu.edu!bsy USPS: Bennet Yee, CS Dept, CMU, Pittsburgh, PA 15213-3890 Voice: (412) 268-7571 --