unstrip

Alex S. Crain alex at umbc3.UMD.EDU
Thu Oct 6 05:06:15 AEST 1988


	Mike Ditto's unstrip.c program that was posted a little while ago
has the nasty habit of zeroing out the entry point and executable flags
in the executable. Here is a patch to fix that...

	Replace the end of readhdrs() which looks like

	[...]
	
	    return 0;
	}

	add these lines

	[...]

+	    rewind(fp);
+	
+	    filehdr.f_flags |= F_EXEC;
+	    fwrite((char *)&filehdr, sizeof filehdr, 1, fp);
+	
+	    aouthdr.entry = 0x80000;
+	    fwrite((char *)&aouthdr, sizeof aouthdr, 1, fp);
+	
	    return 0;
	}-- 
					:alex.
					Systems Programmer
nerwin!alex at umbc3.umd.edu		UMBC
alex at umbc3.umd.edu



More information about the Comp.sys.att mailing list