Can't get this to build at all. Ubuntu 9.04, 64bit:
make RELEASE=1
tar xzf ghf-0.5-2.tar.gz
make -C ghf clean all RELEASE=1
make[1]: Entering directory `/home/xvzf/qlh_distro/ghf'
rm -rf asm.o elf.o utils.o vfunction.o libghf.a ghf-test.o ghf-test ghf-0.5-2.tar.gz ghf
cc -Wall -pipe -march=i686 -I/usr/include/libelf -c -o asm.o asm.c
asm.c:1: error: CPU you selected does not support x86-64 instruction set
make[1]: *** [asm.o] Error 1
make[1]: Leaving directory `/home/xvzf/qlh_distro/ghf'
make: *** [ghf/libghf.a] Error 2
Changed the ghf -march i686 to x86-64, and removed untaring of the ghf so the makefile change isn't lost:
make -C ghf clean all RELEASE=1
make[1]: Entering directory `/home/xvzf/qlh_distro/ghf'
rm -rf asm.o elf.o utils.o vfunction.o libghf.a ghf-test.o ghf-test ghf-0.5-2.tar.gz ghf
cc -Wall -pipe -march=x86-64 -I/usr/include/libelf -c -o asm.o asm.c
asm.c: In function ‘my_buffer_read_memory’:
asm.c:31: warning: cast to pointer from integer of different size
asm.c: In function ‘disassemble_x86’:
asm.c:55: warning: cast from pointer to integer of different size
asm.c: In function ‘detourFunction’:
asm.c:105: warning: cast from pointer to integer of different size
asm.c:105: warning: cast from pointer to integer of different size
asm.c:105: warning: cast to pointer from integer of different size
asm.c:108: warning: cast from pointer to integer of different size
asm.c:108: warning: cast to pointer from integer of different size
asm.c:110: warning: cast from pointer to integer of different size
asm.c:110: warning: cast to pointer from integer of different size
asm.c:110: warning: cast from pointer to integer of different size
asm.c:110: warning: cast from pointer to integer of different size
asm.c:110: warning: cast to pointer from integer of different size
asm.c:111: warning: cast from pointer to integer of different size
asm.c:111: warning: cast to pointer from integer of different size
asm.c: In function ‘undetourFunction’:
asm.c:121: warning: cast from pointer to integer of different size
asm.c:121: warning: cast to pointer from integer of different size
asm.c:123: warning: cast from pointer to integer of different size
asm.c:123: warning: cast to pointer from integer of different size
asm.c: In function ‘nopInstruction’:
asm.c:133: warning: cast from pointer to integer of different size
asm.c:133: warning: cast to pointer from integer of different size
asm.c:137: warning: cast from pointer to integer of different size
asm.c:137: warning: cast to pointer from integer of different size
cc -Wall -pipe -march=x86-64 -I/usr/include/libelf -c -o elf.o elf.c
elf.c: In function ‘pltHook’:
elf.c:172: warning: cast to pointer from integer of different size
cc -Wall -pipe -march=x86-64 -I/usr/include/libelf -c -o utils.o utils.c
g++ -Wall -pipe -march=x86-64 -I/usr/include/libelf -c -o vfunction.o vfunction.cpp
ar r libghf.a asm.o elf.o utils.o vfunction.o
ar: creating libghf.a
ranlib libghf.a
g++ -Wall -pipe -march=x86-64 -I/usr/include/libelf -c -o ghf-test.o ghf-test.cpp
ghf-test.cpp: In member function ‘void GhfTest::testGetSection()’:
ghf-test.cpp:26: warning: deprecated conversion from string constant to ‘char*’
ghf-test.cpp:29: warning: deprecated conversion from string constant to ‘char*’
ghf-test.cpp:32: warning: deprecated conversion from string constant to ‘char*’
ghf-test.cpp:36: warning: deprecated conversion from string constant to ‘char*’
ghf-test.cpp:39: error: cast from ‘int (*)(int, char**)’ to ‘unsigned int’ loses precision
ghf-test.cpp:40: error: cast from ‘int (*)(int, char**)’ to ‘unsigned int’ loses precision
ghf-test.cpp: In member function ‘void GhfTest::testGetSymbol()’:
ghf-test.cpp:53: warning: deprecated conversion from string constant to ‘char*’
ghf-test.cpp:57: warning: deprecated conversion from string constant to ‘char*’
ghf-test.cpp:60: warning: deprecated conversion from string constant to ‘char*’
ghf-test.cpp:62: error: no matching function for call to ‘assertEquals(long unsigned int, unsigned int, CppUnit::SourceLine, const char [1])’
ghf-test.cpp:64: warning: deprecated conversion from string constant to ‘char*’
ghf-test.cpp:66: error: no matching function for call to ‘assertEquals(long unsigned int, unsigned int, CppUnit::SourceLine, const char [1])’
ghf-test.cpp:68: warning: deprecated conversion from string constant to ‘char*’
ghf-test.cpp: In member function ‘void GhfTest::testPltHook()’:
ghf-test.cpp:75: warning: deprecated conversion from string constant to ‘char*’
ghf-test.cpp:77: error: cast from ‘void*’ to ‘int’ loses precision
make[1]: *** [ghf-test.o] Error 1
make[1]: Leaving directory `/home/xvzf/qlh_distro/ghf'
make: *** [ghf/libghf.a] Error
Any ideas?