[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference noted::hackers_v1

Title:-={ H A C K E R S }=-
Notice:Write locked - see NOTED::HACKERS
Moderator:DIEHRD::MORRIS
Created:Thu Feb 20 1986
Last Modified:Mon Aug 03 1992
Last Successful Update:Fri Jun 06 1997
Number of topics:680
Total number of notes:5456

158.0. "Merge Images into One file" by TURTLE::GILBERT () Wed Sep 18 1985 15:04

I'm looking for the following hack.  Do you have such a hack?

I'd like to merge two images (one executable, one shareable)
into a single file.  Sorry, but I can't re-link them.  Help?

					- Gilbert
T.RTitleUserPersonal
Name
DateLines
158.1VAXUUM::DYERThu Sep 19 1985 02:284
	Just append them together!
	Oh, you want them to run?  Well, why didn't you say so?
I assume the executable image doesn't use LIB$FIND_IMAGE_SYMBOL?
		<_Jym_>
158.2TURTLE::GILBERTThu Sep 19 1985 16:401
Turkey!  Of course I want the thing to run!
158.3HARE::COWANSat Sep 21 1985 21:4417
	Sounds like an interesting piece of work, comparable to the
amount of code in the LINKer.

	Off the top of my head, I don't think there is an easy way.  The
fixup sections need to be merged and you'd need to adjust the image
relative address of all the clusters in one of the images.  If the base
image was linked to the sharable image, then you'd have to do all the
image fixups for the sharable image when you bundled them together and
remove the sharable image from the list of sharable images that 
an image links against.  I don't know where this info is stored.  

	Interesting piece of work.  I'd be interested in seeing it
when you have it working.  I certainly have a few sharable images
for you to play with :-).

	KC
 
158.4RANI::LEICHTERJSat Oct 05 1985 11:3616
The easiest way - still not easy! - might be to write a more general program:
One that would save the current memory image as an executable file.  TOPS-10,
of course, provided such a facility as part of the OS, and I've used programs to
do the same thing on TOPS-20.  (The one on TOPS-20 actually went out of its way
NOT to save pure pages from shareable images, so your EXE file would be small.
It was meant for things like saving away huge LISP programs that might take a
long time to initialize up to a given state that you would want to get back to
later.)

Such a program would be very handy to have around.

If writing an actual, complete image file is too complex, you could probably
use the facility that the AME uses to start up a "restart" program; then the
actual contents of the file could be anything convenient.

							-- Jerry
158.5VAXUUM::DYERTue Oct 08 1985 10:262
	[RE .4]:  Now *that* makes sense!
		<_Jym_>