How do I build and use DieHard?
The source code for DieHard is in the src/ directory.
standalone
To use the standalone version, just enter make
(Linux, Solaris) or nmake /f Makefile.win32 (Windows). On
Linux and Solaris, use DieHard by setting the
LD_PRELOAD environment variable, as in
|
setenv LD_PRELOAD /path/to/diehard/libdiehard.so
|
On Windows, you need to link your program with the /MD
flag and usewinhard.obj and
winhard.lib. Then copy winhard.dll to
the same directory as the executable. There is also a Detours version that
lets you replace the allocator in a compiled executable as long as it was
dynamically linked with the C library:
|
detours/withdll.exe -d:diehard-detours.dll your.exe.here
|
replicated
To use the replicated version (Linux or Solaris only), compile with
make and invoke your program with (for example):
|
diehard 3 /path/to/libdiehard_r.so yourapp
|
This would create 3 replicas of yourapp. If the
application does not read from standard input, add <
/dev/null to the command line.
Terms of use
DieHard is Copyright (C) 2005-6