syscall_intercept icon indicating copy to clipboard operation
syscall_intercept copied to clipboard

Compilation error

Open thed00de opened this issue 7 years ago • 2 comments

After calling make I get the following, any help appreciated, thanks.

$ make [ 0%] Built target check_whitespace [ 2%] Built target cpp_test [ 2%] Built target cstyle [ 8%] Built target syscall_intercept_base_c [ 8%] Built target syscall_intercept_base_clf [ 9%] Built target syscall_intercept_base_asm [ 10%] Built target syscall_intercept_unscoped [ 12%] Built target generate_syscall_intercept_scoped [ 14%] Built target syscall_intercept_shared [ 16%] Built target syscall_intercept_static [ 17%] Built target check_license_executable [ 19%] Built target syscall_logger [ 20%] Built target fork_ban [ 21%] Built target icap [ 23%] Built target vfork_logging [ 25%] Built target intercept_sys_write [ 26%] Built target test_clone_thread_preload [ 27%] Built target test_clone_thread [ 28%] Built target filter_test [ 29%] Built target hook_test_preload_o [ 29%] Built target hook_test_preload_with_static [ 30%] Built target hook_test_preload_with_shared [ 31%] Building ASM object test/CMakeFiles/pattern_jmps.in.dir/pattern_jmps.in.S.o /home/ivanc/dev/syscall_intercept/test/pattern_jmps.in.S:51:9: error: unknown token in expression jmp 0f ^ /home/ivanc/dev/syscall_intercept/test/pattern_jmps.in.S:54:9: error: unknown token in expression jmp 0f ^ make[2]: *** [test/CMakeFiles/pattern_jmps.in.dir/pattern_jmps.in.S.o] Error 1 make[1]: *** [test/CMakeFiles/pattern_jmps.in.dir/all] Error 2 make: *** [all] Error 2

thed00de avatar Aug 10 '18 09:08 thed00de

I have it working with some modifications to these offending ASM instructions i.e. I changed the numeric labels to symbolic labels.

One thing I was hoping it would do is patch the main executable itself e.g. 'ls' in your example. In that case then working on statically linked binaries. Is this possible to do?

thed00de avatar Aug 10 '18 11:08 thed00de

Hi @thed00de ,

What assembler is that -- can I reproduce this error?

you can use the environment variable INTERCEPT_ALL_OBJS for this -- it is not tested a lot, but should work most of the time, i.e.:

LD_PRELOAD=/path/to/syscall_intercept.so INTERCEPT_ALL_OBJS=1 ./application

Let me know how that works out for you!

GBuella avatar Aug 10 '18 22:08 GBuella