bpatch man page on BSDi

Man page or keyword search:  
man Server   6284 pages
apropos Keyword Search (all sections)
Output format
BSDi logo
[printable version]

BPATCH(1)		     BSD Reference Manual		     BPATCH(1)

NAME
     bpatch - display or patch executable binary files

SYNOPSIS
     bpatch [-bclqsw] [-r] [-M memfile] [-N a.out] location [value]

DESCRIPTION
     The bpatch utility displays or patches values in executable binary files.
     It defaults to displaying the kernel image /bsd. It may also be used to
     display values from a running kernel in memory.

     The location parameter is a symbol name, or an address specified as a
     number.  An address may be specified in decimal, hexadecimal or octal; a
     leading ``0'' indicates an octal value, a leading ``0x'' indicates a hex-
     adecimal value, and the default is a decimal value.

     If a value is specified, it is stored into that location, as specified by
     the type options.	If no value is specified, the current value at the lo-
     cation is displayed as specified by the type options.

     If no type option is specified, the value at the location is assumed to
     be a 32-bit integer, signed or unsigned.

     The type options specify the format and width of the value to be dis-
     played or patched:

     -b	   The value is an 8-bit byte given as a number, signed or unsigned.

     -c	   The value is an 8-bit byte given as an ASCII character.

     -l	   The value is a 32-bit integer ``longword'', signed or unsigned.

     -q	   The value is a 64-bit integer ``quadword'', signed or unsigned.

     -s	   The value is a string of bytes.

     -w	   The value is a 16-bit integer ``word'', signed or unsigned.

     Other options:

     -M memfile	  Patch the specified memory device rather than the a.out file
		  itself.  User and kernel core files are not supported.

     -N a.out	  Specify an alternate a.out file instead of the default file
		  /bsd.

     -r		  Patch the running kernel in memory rather than the kernel
		  image /bsd on disk.  This option is equivalent to -M
		  /dev/kmem.

     Note that kernel memory may not be modified if the system's current secu-
     rity level is greater than 0.  This normally means that you may not use
     the -r option unless the system is in single user mode.

     The bpatch utility is generally used only in those rare cases where
     sysctl(8),	 getconf(8) or gdb(1) are not more suitable.

SEE ALSO
     gdb(1),  hexdump(1),  mem(4),  sysctl(8)

AUTHOR
     Mike Karels, BSDI

BUGS
     Only a.out(5) and elf(5) binary file types are supported.

     The 16-bit ``word'' terminology is quaint.

BSDI BSD/OS		       October 18, 1997				     2
[top]

List of man pages available for BSDi

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net