Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!husc6!bu-cs!bzs From: bzs@bu-cs.BU.EDU (Barry Shein) Newsgroups: net.unix-wizards,net.unix Subject: ld and the -A option Message-ID: <2223@bu-cs.bu-cs.BU.EDU> Date: Sun, 2-Nov-86 23:22:31 EST Article-I.D.: bu-cs.2223 Posted: Sun Nov 2 23:22:31 1986 Date-Received: Tue, 4-Nov-86 00:22:04 EST Organization: Boston U. Comp. Sci. Lines: 17 Xref: mnetor net.unix-wizards:8576 net.unix:6121 >Can anyone explain exactly how this feature may be used ? The man page >indicates that it may be used to generate an a.out file that may be >read into an already executing program (eg like an overlay or dynamic >loading ???). It is not clear how this can be done. Yes, you (and the man page) are correct, for example Franz Lisp uses the -A flag to relocate compiled lisp modules for loading. Similarly I once wrote a dynamic link loader which used -A similarly. (sorry, it was under contract, I don't own it.) The basic idea is that you figure out where the code will want to be loaded and build and run an 'ld -A xyzzy' command to re-locate it, the rest is fairly straightforward (after staring at things for a while.) You may want to have a look at the -T option also. -Barry Shein, Boston University