Xref: utzoo unix-pc.general:1476 unix-pc.bugs:51 comp.sys.att:4411 Path: utzoo!utgpu!water!watmath!uunet!ukma!nrl-cmf!ames!haven!umbc3!alex From: alex@umbc3.UMD.EDU (Alex S. Crain) Newsgroups: unix-pc.general,unix-pc.bugs,comp.sys.att Subject: unstrip Message-ID: <1225@umbc3.UMD.EDU> Date: 5 Oct 88 19:06:15 GMT Reply-To: alex@umbc3.UMD.EDU (Alex S. Crain) Organization: University of Maryland, Baltimore County Lines: 30 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@umbc3.umd.edu UMBC alex@umbc3.umd.edu