1*8e3beef5Swiz.\" $NetBSD: binpatch.8,v 1.7 2001/11/26 00:06:40 wiz Exp $ 26e765885Schopps.\" 36e765885Schopps.\" Copyright (c) 1994 Christian E. Hopps 46e765885Schopps.\" All rights reserved. 56e765885Schopps.\" 66e765885Schopps.\" Redistribution and use in source and binary forms, with or without 76e765885Schopps.\" modification, are permitted provided that the following conditions 86e765885Schopps.\" are met: 96e765885Schopps.\" 1. Redistributions of source code must retain the above copyright 106e765885Schopps.\" notice, this list of conditions and the following disclaimer. 116e765885Schopps.\" 2. Redistributions in binary form must reproduce the above copyright 126e765885Schopps.\" notice, this list of conditions and the following disclaimer in the 136e765885Schopps.\" documentation and/or other materials provided with the distribution. 146e765885Schopps.\" 3. All advertising materials mentioning features or use of this software 156e765885Schopps.\" must display the following acknowledgement: 166e765885Schopps.\" This product includes software developed by Christian E. Hopps. 171cd39537Spk.\" 4. The name of the author may not be used to endorse or promote products 186e765885Schopps.\" derived from this software without specific prior written permission 196e765885Schopps.\" 206e765885Schopps.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR 216e765885Schopps.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 226e765885Schopps.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 236e765885Schopps.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 246e765885Schopps.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 256e765885Schopps.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 266e765885Schopps.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 276e765885Schopps.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 286e765885Schopps.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 296e765885Schopps.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 306e765885Schopps.\" 316e765885Schopps.Dd February 2, 1994 32faab20a3Schopps.Dt BINPATCH 8 amiga 33faab20a3Schopps.Os 346e765885Schopps.Sh NAME 356e765885Schopps.Nm binpatch 3682d7115cSenami.Nd "examine and or modify initialized data in a binary file" 376e765885Schopps.Sh SYNOPSIS 386e765885Schopps.Nm binpatch 396e765885Schopps.Op Fl b | Fl w | Fl l 406e765885Schopps.Op Fl o Ar offset 416e765885Schopps.Fl s Ar symname 426e765885Schopps.Op Fl r Ar value 436e765885Schopps.Ar binfile 446e765885Schopps.Nm binpatch 456e765885Schopps.Op Fl b | Fl w | Fl l 466e765885Schopps.Op Fl o Ar offset 476e765885Schopps.Fl a Ar addr 486e765885Schopps.Op Fl r Ar value 496e765885Schopps.Ar binfile 506e765885Schopps.Sh DESCRIPTION 51*8e3beef5Swiz.Nm 526e765885Schoppsis used to modify or examine the data associated with a symbol in a binary 536e765885Schoppsfile 546e765885Schopps.Ar binfile . 556e765885SchoppsThe flags 566e765885Schopps.Fl b , 576e765885Schopps.Fl w 586e765885Schoppsand 596e765885Schopps.Fl l 606e765885Schoppsspecify the size of the data to be modified or examined 616e765885Schopps(byte, word and long respectively.) The 626e765885Schopps.Ar binfile 636e765885Schoppsis scanned in search of the symbol 646e765885Schopps.Ar symname 656e765885Schopps(specified with the 666e765885Schopps.Fl s 676e765885Schoppsflag) 686e765885SchoppsIf the symbol is found the current data and address are printed. Next if the 696e765885Schopps.Fl r 706e765885Schoppsflag has been given, the current data is replaced with that of 716e765885Schopps.Ar value . 726e765885Schopps.Pp 736e765885SchoppsIf the second form is used the address 746e765885Schopps.Ar addr 756e765885Schoppsspecified with the 766e765885Schopps.Fl a 776e765885Schoppsflag is used as a direct address into the data section of the binary and 786e765885Schoppsno symbol search is performed. 796e765885Schopps.Pp 806e765885SchoppsThe 816e765885Schopps.Fl o 82*8e3beef5Swizflag specifies an offset in byte, word or long 83*8e3beef5Swiz.Fl ( b , 84*8e3beef5Swiz.Fl w , 856e765885Schoppsor 86*8e3beef5Swiz.Fl l ) 87*8e3beef5Swizunits from the given locator 88*8e3beef5Swiz.Fl ( s 896e765885Schoppsor 90*8e3beef5Swiz.Fl a ) 91*8e3beef5Swizfor 92*8e3beef5Swiz.Nm 93*8e3beef5Swizto perform its described actions. 94