From owner-freebsd-questions Mon Jan 16 18:29:59 1995 Return-Path: questions-owner Received: (from root@localhost) by freefall.cdrom.com (8.6.9/8.6.6) id SAA23204 for questions-outgoing; Mon, 16 Jan 1995 18:29:59 -0800 Received: from remote1-line1.cis.yale.edu (remote1-line1.cis.yale.edu [130.132.57.21]) by freefall.cdrom.com (8.6.9/8.6.6) with ESMTP id SAA23198 for ; Mon, 16 Jan 1995 18:29:55 -0800 Received: (from mrami@localhost) by remote1-line1.cis.yale.edu (8.6.9/8.6.9) id UAA00713; Mon, 16 Jan 1995 20:47:14 -0500 Date: Mon, 16 Jan 1995 20:47:14 -0500 (EST) From: Marc Ramirez To: questions@FreeBSD.org Subject: GCL and unexec() Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: questions-owner@FreeBSD.org Precedence: bulk So, I decided tonight would be the night I make GCL run on FreeBSD v2.0. Big mistake. Actually, it wasn't that bad, but I have hit an insurmountable (for me, anyways) wall. When it comes time to load the "raw" gcl, add the base package, and write it out as the "saved" gcl via unexec(), the binary is not being written out properly. I know nothing about linking or making binaries, so I have two questions: 1) What is the easiest thing to do? My idea of the "easiest" solution is to compile the "raw" gcl as a statically linked OMAGIC or ZMAGIC binary (I don't *think* the code is self-modifying, so maybe ZMAGIC). That way, the trick would be to dump text, dump data, and dump bss. 2) What is the right thing to do? Basically, I don't have an understanding of the load/map-in process. Does the kernel just throw the binary into virtual memory and JMP? What happens to the exec header? Is it lost? If not, could I write a library function unexec() which could be used for ever and ever, maintained by whomever maintains the exec format du jour? Basically, I want to do the easiest now, and shoulder the responsibility of doing the best later. (Spoken like a true procrastinator). One other thing: I went to a fly tying class tonight. For those of you that don't know, it is a *great* place to meet women! :) Marc. -- DeForrest Gump - "Dammit, Jim! Life is like a box of chocolates!"