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

dereferencing pointer to incomplete type ‘struct clone_args’ #15

Open
TsengMingYi opened this issue Mar 21, 2024 · 3 comments
Open

Comments

@TsengMingYi
Copy link

For libzpoline.so, i type the following command.
make
I get the following error: main.c:242:9: error: dereferencing pointer to incomplete type ‘struct clone_args’
if (ca->flags & CLONE_VM)

@yasukata
Copy link
Owner

Thank you for your message.

I have updated the program in 773a09f ; I hope this change fixes the reported issue.

I would appreciate it if you give us another message here if you still see the same error after applying the change above.

Thank you very much for reporting the issue.

@TsengMingYi
Copy link
Author

Thank you for your reply.

But for libzpoline.so I type the following:
make

and I get another error:
gcc -O3 -pipe -g -rdynamic -Werror -Wall -Wunused-function -Wextra -shared -fPIC -DSUPPLEMENTAL__REWRITTEN_ADDR_CHECK -c -o main.o main .c
gcc -O3 -pipe -g -rdynamic -Werror -Wall -Wunused-function -Wextra -shared -fPIC -DSUPPLEMENTAL__REWRITTEN_ADDR_CHECK -o libzpoline.so main.o -lopcodes -ldl
/usr/bin/ld: main.o: relocation R_X86_64_PC32 against symbol `syscall_hook' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: error: ld returned 1 exit status
Makefile:33: recipe for target 'libzpoline.so' failed
make: *** [libzpoline.so] Error 1

Does the error mean suggests that there is a relocation issue with this symbol ?

@yasukata
Copy link
Owner

Thank you for your quick reply.

Actually, I already have the pointer to the solution #11 , but I have not reflected it yet.

I made a change in aa18e55 to resolve this issue, and I hope that now you can compile the program.

Again, I would appreciate it if you write another message here if you still see the compilation error.

Thank you very much for your report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants