F2.MJP@ISUMVS.BITNET ("Mike Purtell") (12/17/88)
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. I want to do this. I can't find enough information in the manual to figure it out. Apparently, some 'special software tool', mentioned only once in the manual, is needed to create an object file with the resident library definitions in it from an object file with absolute definitions. I'll write the tool myself if I can find out exactly what the object file is too look like after conversion. I've already tried just converting the symbol data units in the hunk_ext from type ext_abs to ext_res, but this didn't seem to make any difference. Can anyone help me? Is this feature not really there? Is it a bad idea to use it? In the search for knowledge I become more ignorant the more I search. ------------------------------------------------------------------------------ Mike Purtell Bitnet: f2.mjp@ISUMVS PO BOX 1519 Internet: f2.mjp@MVS1.IASTATE.EDU Ames, Iowa 50010-1519 USA Institution: Iowa State University ------------------------------------------------------------------------------
kodiak@amiga.UUCP (Robert R. Burns) (12/22/88)
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