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

How do you compile this code please? Any example.. (Trying to compile for arm64-v8a) #47

Open
droidvoider opened this issue Feb 23, 2017 · 2 comments

Comments

@droidvoider
Copy link

droidvoider commented Feb 23, 2017

Edit: Fairly certain this isn't for Android and won't compile as such..
gcc -pthread dirtyc0w.c -o dirtyc0w
gcc -pthread -pie dirtyc0w.c -o dirtyc0w
gcc -pthread -fpie dirtyc0w.c -o dirtyc0w
gcc -pthread -pie -fpie dirtyc0w.c -o dirtyc0w
(not executable: 64-bit ELF file)

Unless you know I'm wrong I believe this is designed for a different OS.

@lxzh
Copy link

lxzh commented Mar 25, 2018

gcc -o dirtyc0w dirtyc0w.c -lpthread

@jobinrjohnson
Copy link

jobinrjohnson commented Mar 26, 2018

You have to use a cross compiler inorder to compile for Android.
When you compile it using gcc it will give you an amd64 binary not arm64. Both architectures are mutually exclusive and something built for arm64 won't work on the other and vice-versa.
So you have to use a toolchain.

https://developer.android.com/ndk/guides/standalone_toolchain.html

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

3 participants