Path: utzoo!utgpu!watserv1!watmath!att!pacbell!pacbell.com!decwrl!wuarchive!rex!samsung!munnari.oz.au!metro!usage.csd.unsw.oz.au!usage.csd!lambert From: lambert@spectrum.cs.unsw.oz.au (Tim Lambert) Newsgroups: comp.sys.apollo Subject: Re: Inlib'ing on SR10.1/2 Message-ID: Date: 7 Sep 90 08:53:11 GMT References: Sender: news@usage.csd.unsw.oz.au Organization: EE & CS, Uni of NSW, Australia Lines: 30 In-reply-to: nick@mucs6.cs.man.ac.uk's message of 6 Sep 90 05:44:04 GMT >>>>> On 6 Sep 90 05:44:04 GMT, nick@mucs6.cs.man.ac.uk (Nick Filer) said: > We have several libraries which have been in use for several years and > are designed to be Inlib'ed rather than being stored in every binary > file. Having moved to SR10.1 on our DN4000's we discovered that > producing an inlib-able library using either "bind" or "ld" does not > work as the library contains "absolute code". Yes, you have to tell the compiler to produce position independent code. And you have to tell ld to load it into "high" memory. And when compiling the main program, you should tell the compiler about the library. One of your make rules was correct :-) The manual that talks about creating shared libraries is more than a little obscure. Try using this makefile: ------------------------------------------------------- hp: hp_main.o hp_foo.lib ld -o hp hp_main.o -A inlib,hp_foo.lib hp_main.o : hp_main.c hp_foo.lib cc -c -W0,-inlib,hp_foo.lib hp_main.c hp_foo.o : hp_foo.c cc -c -W0,-pic hp_foo.c hp_foo.lib : hp_foo.o ld -r -a -A loadhigh -o hp_foo.lib hp_foo.o ------------------------------------------------------- Tim