Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!pacbell.com!ucsd!sdcc6!jclark From: jclark@sdcc6.ucsd.edu (John Clark) Newsgroups: comp.os.os9 Subject: Re: C Linker Library problems -- help! Keywords: OSK, C, linker, libraries Message-ID: <18812@sdcc6.ucsd.edu> Date: 29 Apr 91 23:52:22 GMT References: <1991Apr25.175935.8665@cbnewsd.att.com> <196@blars> Organization: University of California, San Diego Lines: 30 In article <196@blars> blarson@usc.edu writes: + +Nice theory. Too bad it's wrong. (Most unix linkers work that way.) +L68 does not allow multiple routines with the same name. Circularly +refering routines, which other operating systems allow by putting the +same routine in the library multiple times, must be done as a single +source file on OSK. This is one of the uglier hacks still needed in C You can put multiple occurances of the same library names in your link command. You can repeat this until you 'undef' problems stop, or you give up. I once thought of writing an 'lorder' 'tsort' pair which would do what most un*x library builds do, i.e. include multiple instances of files which have circular dependencies. The other solutions are an N-pass linker or a .SYM table tacked on the front of a 'merged' library. The N-pass has the 'advantage' of lower memory usage, whereas the table requires some amount of storage for the table, or some cache management routines to efficiently use the table on disk. At one time I did find a 'lorder' on CompuServe but it was for os9-6809. I looked into the rel file format but that was the end of it. Another alternative is to write a new linker, but isn't that what you buy operationing systems for? I wrote one once, but why do it again! -- John Clark jclark@ucsd.edu