Path: utzoo!yunexus!geac!daveb From: daveb@geac.UUCP (David Collier-Brown) Newsgroups: comp.software-eng Subject: Re: Question Re: Configuration Management Summary: Side discussion on Linkers/Statics Keywords: linkers, software design, Unix as a religion Message-ID: <2323@geac.UUCP> Date: 24 Feb 88 13:53:55 GMT Article-I.D.: geac.2323 Posted: Wed Feb 24 08:53:55 1988 References: <497@aimt.UUCP> <2640@ihlpe.ATT.COM> <188@dinl.mmc.UUCP> <213@ritcv.UUCP> Reply-To: daveb@geac.UUCP (David Collier-Brown) Organization: The G. Yac Linker Department. Lines: 58 Gentlebeings, Unix is not the be-all and end-all of creation. Unix is just better IN THE MAIN than its competition. Now, on to the substance of the discussuion: In article <213@ritcv.UUCP> mjl@ritcv.UUCP (Michael Lutz) writes: >And, for the person who complained about the brain damaged Unix linker and >librarian: most linkers I've encountered have the same restriction. >The library contains object modules, possibly with multiple entry points, >and if you reference one you get them all. It's damn difficult to pull >apart an object module and decide which bytes you need and which ones >are extraneous. The Unix linker/librarian may not set the world on fire >with it's snazzy features, but it most certainly is state of the practice. In article <2984@metavax.UUCP> chris@metavax.UUCP (Chris Collins) writes: > BTW Unix is THE system, for programmers or otherwise, it does >have one obvious drawback: it assumes the user is competent. The idiocy >you speak of is not with system! A lobotomy in your case is not necessary. Both Mike (politely) and Chris (substantially less so) miss the point that the Unix linker was a conscious cheap-and-dirty. The Multics system avoided the whole IDEA of static linkers[1], and most if not all commercial systems not derived from Unix have better linkers. Good Lord, the IBM /360 had a better linker than Unix! (And I wouldn't recommend the /3sickly and its linker to my worst enemy). In order to learn C, a non-unix programmer of my acquaintance ported a subset compiler (Ron Cain's Small C), and taught it to generate code for his assembler/linker set, placing each function in a linkable "procedure record", and emitting "symref records" for all externally required datums of the function, including a symref to a (specially named) record which contained the static data for the module (ie, the file-level statics). Not hard at all. A suitable project for learning the language... In pseudo-linkeese: DSECT _.filename DW 1 ; static int foo; /* A file-level static */ SYMDEF _function CSECT _function LD A1,Sp ; function(p,q) char *p, *q; { LD D1,_.filename+0 ; if (foo) { ... SYMREF _.filename --dave (those who know not history.... piss me off) c-b [1] It had a thing called "binder", which produced almost-fully-resolved modules, more or less for use as efficiently-loadable public libraries. -- David Collier-Brown. {mnetor yunexus utgpu}!geac!daveb Geac Computers International Inc., | Computer Science loses its 350 Steelcase Road,Markham, Ontario, | memory (if not its mind) CANADA, L3R 1B3 (416) 475-0525 x3279 | every 6 months.