Katana Code
Status: Alpha
Brought to you by:
electron100
This is a preliminary version of Katana, a toolchain-oriented
hotpatching system for userland (in contrast to kernel-patching
systems such as KSplice) and a (somewhat) general-purpose ELF and
DWARF manipulation tool. More complete documentation will reside in
./doc, although such is currently in a very early state
DEPENDENCIES
libelf
widely available with a couple different implementations. I
recommend the one from Red Hat at
https://fedorahosted.org/elfutils/. The FSF version
(http://directory.fsf.org/project/libelf/) which is the default
available to gentoo users, does not seem to be fully compatible.
libdwarf
you can get the latest version of libdwarf from
http://reality.sgiweb.org/davea/dwarf.html.
libunwind
http://www.nongnu.org/libunwind/
libreadline
http://www.gnu.org/software/readline/
bison
http://www.gnu.org/software/bison/
flex
http://flex.sourceforge.net/
BUILDING
./configure
make
Note that flex and bison (as well as gcc, of course) are required to
build Katana.
make
./install libdwarf.so DEST
TESTING
To make sure katana works:
make check
USAGE
Katana presently has two main functions
HOTPATCHING
To generate a patch file, run
katana -g [-o OUT_FULE] OLD_OBJECT_TREE NEW_OBJECT_TREE EXEC
(EXEC is the name of the executable file whose process will be patched)
To patch a process run
katana -p PATCH_FILE PID
ELF/DWARF Manipulation
See the shell commands at http://katana.nongnu.org/doc/katana.html#sec-2.1
Further documentation has not yet been written. Email
electron100@gmail.com if you are interested in seeing this expanded