|Dynamic compilation/linking email@example.com (Steve Boswell) (1991-12-05)|
|Re: Dynamic compilation/linking oliver@madrone.CS.Berkeley.EDU (1991-12-07)|
|Re: Dynamic compilation/linking firstname.lastname@example.org (1991-12-10)|
|Re: Dynamic compilation/linking email@example.com (Marc Sabatella) (1991-12-11)|
|Re: Dynamic compilation/linking firstname.lastname@example.org (1991-12-12)|
|Re: Dynamic compilation/linking email@example.com (1991-12-13)|
|Re: Dynamic compilation/linking firstname.lastname@example.org (1991-12-17)|
|From:||oliver@madrone.CS.Berkeley.EDU (Oliver Sharp)|
|Date:||Sat, 7 Dec 91 21:15:16 PST|
Well, I'm glad to hear that there is some interest in this since I am in
the process of writing an article about dynamic linking under BSD for
Doctor Dobbs :-). I'd be happy to answer questions about specific BSDisms
(and I have code to demonstrate them ...). It is non-trivial to figure
out how to use the dynamic linking support in BSD from the man page; I
cheated and got a few hints from the people downstairs.
I've found the dynamic linking code I wrote to be quite portable across
BSD flavors of UNIX, although you must examine a.out.h and make a few
changes to reflect header file differences, magic number differences, etc.
I'm uncertain how it will work on 386 BSD, though, since the 386 memory
management distinguishes between code and data. When you load the code
into a malloc'ed area, you might not be able to call it like you can on
other architectures. I've been meaning to go talk to the 386 BSD people
about it ... As for non-BSD UNIX, I don't do system hacking on them, so
I'm not sure what they offer. I will go scare up some System V manuals
and see if ld has an equivalent to the -A flag. Does anyone know offhand?
It would be useful to mention it in the article.
[Every 386 Unix I've seen maps code and data addresses the same. -John]
Return to the
Search the comp.compilers archives again.