Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compilation error #84

Open
thed00de opened this issue Aug 10, 2018 · 2 comments
Open

Compilation error #84

thed00de opened this issue Aug 10, 2018 · 2 comments
Labels

Comments

@thed00de
Copy link

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
Copy link
Author

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?

@GBuella
Copy link
Contributor

GBuella commented Aug 10, 2018

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 GBuella added the tests label Aug 12, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants