Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site dataio.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!vax135!cornell!uw-beaver!uw-june!entropy!dataio!bjorn From: bjorn@dataio.UUCP (Bjorn Benson) Newsgroups: net.unix-wizards Subject: Loading object files into executing programs Message-ID: <633@dataio.UUCP> Date: Mon, 8-Apr-85 18:02:57 EST Article-I.D.: dataio.633 Posted: Mon Apr 8 18:02:57 1985 Date-Received: Wed, 10-Apr-85 05:32:54 EST Organization: Data I/O Corp., Redmond WA Lines: 24 Request for help: I have a program "PROG" and a number of subroutines "SUB1", "SUB2", etc. that are all in seperate files (PROG is an executable, SUB? are .o files). What I would like to do is have PROG read in any of the SUB? object files and execute them. There are three problems I see: (1) Symbol resolution (dynamic linking) (2) 'Text' expansion (a la sbrk(2)) (3) How to read the linked file in and know its start address Solutions: (1) Use ld(1) with various flags (2) *** This is where I need help *** (3) *** I need help here to, but I would guess a read(2)? *** The solution does not have to be portable, but it needs to work under 4.2bsd. I have looked at the Franz Lisp source and it seems to read object files into the 'data' segment (via sbrk(2)) and I don't even know if they are executable code or just data. (My problem requires executable code.) I appreciate the time anyone takes to help me... Thank you, Bjorn Benson ..!uw-beaver!entropy!dataio!bjorn