Usenet comp.unix.osf.osf1 (1992-2004)
 help / color / mirror / Atom feed
From: bsy+@CS.CMU.EDU (Bennet Yee)
Subject: Re: dynamic loading/dumping out of binaries revisited
Date: Thu, 3 Feb 1994 13:48:09 -0500	[thread overview]
Message-ID: <CKnw89.Aso.3@cs.cmu.edu> (raw)
In-Reply-To: SNL.94Feb3123118@paneer.ndim.edrc.cmu.edu

In article <SNL.94Feb3123118@paneer.ndim.edrc.cmu.edu>, snl@paneer.ndim.edrc.cmu.edu (Sean Levy) writes:
+ [ ... ]
+It seems to me that, at least for systems that use COFF, if I could
+get the starting virtual address and length of each chunk of VM
+containing dynamically loaded code, I could cons up some extra
+sections in the header of the dumped out binary which brought those
+chunks in at exec time, and then append them to the file (just have to
+get the file offsets right in the section headers).  Does this sound
+right?  I haven't taken a serious look at things besides COFF, but it
+sounds to me like this would be a reasonable thing to expect to be
+able to do.
+ [ ... ]

Why do you want to write out the dynamically loaded stuff when you
unexec?  Why not just duplicate what crt0.o does before calling main
(i.e., mmap'ing in the relevant libraries) instead?  Or, better yet,
let the native crt0.o code do its thing normally.  That way, you
benefit from the VM sharing.  OSF/1 / SunOS shared libraries uses
dynamic loading not just to save disk space for the executable images
but also run-time swap space....  If you're doing dld or some other
style of dynamic loading -- for run-time code generation or some other
purpose -- then this comment doesn't apply.

-bsy

-- 
Bennet S. Yee		Phone: +1 412 268-7571		Email: bsy+@cs.cmu.edu
    URL: http://www.cs.cmu.edu:8001/afs/cs.cmu.edu/user/bsy/www/hsh.html
CS Dept, SCS, Carnegie Mellon Univ, 5000 Forbes Ave, Pittsburgh, PA 15213-3891


      reply	other threads:[~1994-02-03 18:48 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1994-02-03 17:31 dynamic loading/dumping out of binaries revisited Sean Levy
1994-02-03 18:48 ` Bennet Yee [this message]
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox