xref: /netbsd-src/share/man/man8/man8.amiga/binpatch.8 (revision ae1bfcddc410612bc8c58b807e1830becb69a24c)
1.\"
2.\" Copyright (c) 1994 Christian E. Hopps
3.\" All rights reserved.
4.\"
5.\" Redistribution and use in source and binary forms, with or without
6.\" modification, are permitted provided that the following conditions
7.\" are met:
8.\" 1. Redistributions of source code must retain the above copyright
9.\"    notice, this list of conditions and the following disclaimer.
10.\" 2. Redistributions in binary form must reproduce the above copyright
11.\"    notice, this list of conditions and the following disclaimer in the
12.\"    documentation and/or other materials provided with the distribution.
13.\" 3. All advertising materials mentioning features or use of this software
14.\"    must display the following acknowledgement:
15.\"      This product includes software developed by Christian E. Hopps.
16.\" 3. The name of the author may not be used to endorse or promote products
17.\"    derived from this software without specific prior written permission
18.\"
19.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
20.\" IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
21.\" OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
22.\" IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
23.\" INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
24.\" NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25.\" DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26.\" THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29.\"
30.\"	$Id: binpatch.8,v 1.2 1994/02/03 18:44:02 chopps Exp $
31.\"
32.Dd February 2, 1994
33.Dt BINPATCH 8 amiga
34.Os
35.Sh NAME
36.Nm binpatch
37.Nd examine and or modify initialized data in a binary file.
38.Sh SYNOPSIS
39.Nm binpatch
40.Op Fl b | Fl w | Fl l
41.Op Fl o Ar offset
42.Fl s Ar symname
43.Op Fl r Ar value
44.Ar binfile
45.Nm binpatch
46.Op Fl b | Fl w | Fl l
47.Op Fl o Ar offset
48.Fl a Ar addr
49.Op Fl r Ar value
50.Ar binfile
51.Sh DESCRIPTION
52.Nm binpatch
53is used to modify or examine the data associated with a symbol in a binary
54file
55.Ar binfile .
56The flags
57.Fl b ,
58.Fl w
59and
60.Fl l
61specify the size of the data to be modified or examined
62(byte, word and long respectively.) The
63.Ar binfile
64is scanned in search of the symbol
65.Ar symname
66(specified with the
67.Fl s
68flag)
69If the symbol is found the current data and address are printed.  Next if the
70.Fl r
71flag has been given, the current data is replaced with that of
72.Ar value .
73.Pp
74If the second form is used the address
75.Ar addr
76specified with the
77.Fl a
78flag is used as a direct address into the data section of the binary and
79no symbol search is performed.
80.Pp
81The
82.Fl o
83flag specifies an offset in byte, word or long (
84.Fl b
85,
86.Fl w
87,
88or
89.Fl l
90) units from the given locator (
91.Fl s
92or
93.Fl a
94) for
95.Nm binpatch
96to perform it's described actions.
97
98