Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!lll-lcc!styx!ames!ucbcad!ucbvax!sdcsvax!darrell From: steve@edm.UUCP (Stephen Samuel) Newsgroups: comp.os.research Subject: Re: Shared Libraries Message-ID: <3095@sdcsvax.UCSD.EDU> Date: Sat, 2-May-87 08:31:33 EDT Article-I.D.: sdcsvax.3095 Posted: Sat May 2 08:31:33 1987 Date-Received: Sat, 9-May-87 01:00:51 EDT Sender: darrell@sdcsvax.UCSD.EDU Organization: Unexsys Systems Inc., Edmonton,AB. Lines: 42 Approved: mod-os@sdcsvax.uucp The way run-time loading is done on MTS requires 3 loader sections: 1) External Symbol Directories consist of the name of the routine and the number 2) ReLocation Directory consisted of the rotine # (from ESD), displacement into the loaded routine where it is used, and type of reference (2-byte/4-byte, relative/absolute etc.) 3) The actual text contains any displacement from the 'external' location's public address EG: pseudo-C for an absolute reference to _fread+16 from 0x7da into a subroutine, with fread being the 6th symbol referenced) would consist of: ESD: ... struct { char EsdNam[ENSIZE] ; THING * ES_ptr; } esd_sym[] = { <5 entries>, {"_fread ",NULL} ...} RLD: ... struct { int EsdNum; int disp ; FLAGS type } rld_sym[] ={ ..., {5,0x7da,RT_16bit+RT_abs} ... } routine+0x7da: (thing *) 16 once all external references were found, the value of each referencing location (assuming all pointers were the same length) was: for(i=0;i