Re: Dynamic compilation/linking

oliver@madrone.CS.Berkeley.EDU (Oliver Sharp)
Sat, 7 Dec 91 21:15:16 PST

          From comp.compilers

Related articles
Dynamic compilation/linking whatis@ucsd.edu (Steve Boswell) (1991-12-05)
Re: Dynamic compilation/linking oliver@madrone.CS.Berkeley.EDU (1991-12-07)
Re: Dynamic compilation/linking fkittred@bbn.com (1991-12-10)
Re: Dynamic compilation/linking mjs@hpmonk.fc.hp.com (Marc Sabatella) (1991-12-11)
Re: Dynamic compilation/linking pardo@cs.washington.edu (1991-12-12)
Re: Dynamic compilation/linking tbn@csd.cri.dk (1991-12-13)
Re: Dynamic compilation/linking parag@netcom.com (1991-12-17)
| List of all articles for this month |

Newsgroups: comp.compilers
From: oliver@madrone.CS.Berkeley.EDU (Oliver Sharp)
Keywords: linking
Organization: Compilers Central
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.


- Oliver
[Every 386 Unix I've seen maps code and data addresses the same. -John]


--


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.