Subject: Re: a.out header editing?
To: Chris Baird <cjb@brushtail.apana.org.au>
From: Simon Burge <simonb@netbsd.org>
List: netbsd-help
Date: 03/24/2000 21:36:21
Chris Baird wrote:

> Does there exist a utility anywhere for modifying the shared object
> descriptors in a ZMAGIC executible?
> 
> I ask because some joker slipped in a "ln -s libm.so.0.0 libm.so.2.0" on
> a machine here, and as a result, nearly everything that's been compiled
> during the last N years has funny ideas of the libraries it wants. :/

You could try "vi" :-)  Seriously, I often use vi for small-scale binary
editing without problems.  About the only "gotcha" is that it will write
an extra newline to the end of the file if it doesn't have one.  I
usually use "dd if=foo of=foo.new bs=<orig-size> count=1" to remove the
extra byte.  There may be an easier way, but this works for me.

Note that this is using the "nvi" the comes with *BSD and won't work
with most commercial vendor supplied ``traditional'' vi's.

Simon.