Appending text to executables

Steve Barber barber at rabbit1.UUCP
Wed Jan 21 03:30:18 AEST 1987


Will anything bad happen if I append arbitrary text to a UNIX executable
(a.out) file?  Basically, I need to have copyright notices physically
present in my a.out files and I don't want to hassle with relinking
the things.  Now, run files don't have checksums, so there shouldn't
be any problem there.  The a.out formats are pretty self-describing, so
I don't think exec(2) will actually load the stuff, but I don't know for
sure.

So, just for the sake of argument and to provide an example, if I did

	cat /bin/sh /etc/group >mysh
	chmod 555 mysh

Would

	mysh

do the right thing?  That is, would it behave identically to /bin/sh?

Are there any versions of UNIX (or derivatives) where this wouldn't work?
Naturally, I'll summarize responses to this most burning of questions.
Thanks in advance. (No, I'm not intending to claim copyright on /bin/sh :-)


	
-- 
Steve Barber    Rabbit Software Corp.
...!ihnp4!{cbmvax,cuuxb}!hutch!barber  ...!psuvax1!burdvax!hutch!barber
(215) 647-0440  7 Great Valley Parkway East  Malvern PA 19355



More information about the Comp.unix.wizards mailing list