ld and the -A option

Barry Shein bzs at bu-cs.BU.EDU
Mon Nov 3 14:22:31 AEST 1986


>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



More information about the Comp.unix.wizards mailing list