Path: utzoo!attcan!uunet!husc6!bloom-beacon!tut.cis.ohio-state.edu!cwjcc!hal!nic.MR.NET!xanth!ames!oliveb!amiga!kodiak From: kodiak@amiga.UUCP (Robert R. Burns) Newsgroups: comp.sys.amiga.tech Subject: Re: resident library call feature of the linker(ALINK): HOW? Message-ID: <3211@amiga.UUCP> Date: 21 Dec 88 22:48:19 GMT References: <8812171054.AA10776@ucbvax.Berkeley.EDU> Reply-To: kodiak@tooter.UUCP (Robert Burns) Organization: Commodore-Amiga Inc, Los Gatos CA Lines: 36 In article <8812171054.AA10776@ucbvax.Berkeley.EDU> F2.MJP@ISUMVS.BITNET ("Mike Purtell") writes: )I noticed something in the AmigaDos Develper's Manual that I've never seen )anyone mention before. It's the 'resident library call feature' of the linker )(ALINK). The idea is that the loader opens the resident libraries and patches )my code so that JSR's for library routines are right to the routines in the )libraries. This would save the use of a register for the library base and I )think it also bypasses the jump tables in the libraries making for more )efficient routine calls. There are several reasons you've seen noone mention this before: 1. The code to perform this in LoadSeg is currently broken. You could still use it with a kludge, but doing so would break if we decided to fix LoadSeg. 2. The idea here was to automatically open exec libraries and relocate function references of the form jsr _LVOFunction But note: a. The libraries referenced with this feature break the open/use/close paradigm. b. The jump table is still used, no speed savings there. c. Libraries tend to need the library base in register a6 anyway, so they can get at their local variables. d. Given that a6 contains the library base, the interface you use now: jsr _LVOFunction(a6) is 33% smaller, a little faster, and requires no relocation at load time (i.e. faster load). )I want to do this.... No, you don't :-). -- Bob Burns, amiga!kodiak _ | /_ _|. _ | Commodore __ |_) _ |_ _ )' |<(_)(_)|(_\|< /\ | ||| _` /\ |_)(_\| )(_\ | | \ Software ___/..\|\/|||__|/..\___ Faith