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

fail to support arm64-v8a? #23

Open
jtbuaa opened this issue May 17, 2016 · 3 comments
Open

fail to support arm64-v8a? #23

jtbuaa opened this issue May 17, 2016 · 3 comments

Comments

@jtbuaa
Copy link

jtbuaa commented May 17, 2016

after add below line in instruments/base/jni/Application.mk
APP_ABI := armeabi armeabi-v7a arm64-v8a,
build.sh report several error.
so how to support arm64-v8a?

/tmp/ccHKfvB7.s: Assembler messages:
/tmp/ccHKfvB7.s:24: Error: operand 1 should be an integer register -- mov r0,x3' /tmp/ccHKfvB7.s:25: Error: operand 1 should be an integer register --mov r1,x4'
/tmp/ccHKfvB7.s:26: Error: operand 1 should be an integer register -- mov r7,x2' /tmp/ccHKfvB7.s:27: Error: operand 1 should be an integer register --mov r2,#0x0'
/tmp/ccHKfvB7.s:177: Error: operand 1 should be an integer register -- mov r0,x2' /tmp/ccHKfvB7.s:178: Error: operand 1 should be an integer register --mov r1,x4'
/tmp/ccHKfvB7.s:179: Error: operand 1 should be an integer register -- mov r7,x3' /tmp/ccHKfvB7.s:180: Error: operand 1 should be an integer register --mov r2,#0x0'
/tmp/ccHKfvB7.s:440: Error: operand 1 should be an integer register -- mov r0,x2' /tmp/ccHKfvB7.s:441: Error: operand 1 should be an integer register --mov r1,x4'
/tmp/ccHKfvB7.s:442: Error: operand 1 should be an integer register -- mov r7,x3' /tmp/ccHKfvB7.s:443: Error: operand 1 should be an integer register --mov r2,#0x0'
/tmp/ccHKfvB7.s:683: Error: operand 1 should be an integer register -- mov r0,x2' /tmp/ccHKfvB7.s:684: Error: operand 1 should be an integer register --mov r1,x4'
/tmp/ccHKfvB7.s:685: Error: operand 1 should be an integer register -- mov r7,x3' /tmp/ccHKfvB7.s:686: Error: operand 1 should be an integer register --mov r2,#0x0'
/tmp/ccHKfvB7.s:798: Error: operand 1 should be an integer register -- mov r0,x2' /tmp/ccHKfvB7.s:799: Error: operand 1 should be an integer register --mov r1,x4'
/tmp/ccHKfvB7.s:800: Error: operand 1 should be an integer register -- mov r7,x3' /tmp/ccHKfvB7.s:801: Error: operand 1 should be an integer register --mov r2,#0x0'
make: *** [/home/jingtao/git/adbi/instruments/base/obj/local/arm64-v8a/objs/base/__/hook.o] Error 1

@jduck
Copy link
Collaborator

jduck commented May 17, 2016

For one you'd need to re-implement the custom syscall function for arm64. Then, there are some calling convention and stack layout issues for arm64 that need to be dealt with. Finally, There are some hardcoded instruction bytes here and there that need to be addressed (ported to arm64 and tested). Check out hook.c and look for "mov", "push", "ldr", etc.

@Naveenmahmood
Copy link

By compiling hijack.c i got the following errors
PTRACE_GETREGS undeclared (first use in function)
PTRACE_SETREGS undeclared ....

Also on compiling instruments/base/hook.c i got

/tmp/ccHKfvB7.s: Assembler messages:
/tmp/ccHKfvB7.s:24: Error: operand 1 should be an integer register -- mov r0,x3' /tmp/ccHKfvB7.s:25: Error: operand 1 should be an integer register --mov r1,x4'
/tmp/ccHKfvB7.s:26: Error: operand 1 should be an integer register -- mov r7,x2' /tmp/ccHKfvB7.s:27: Error: operand 1 should be an integer register --mov r2,#0x0'
/tmp/ccHKfvB7.s:177: Error: operand 1 should be an integer register -- mov r0,x2' /tmp/ccHKfvB7.s:178: Error: operand 1 should be an integer register --mov r1,x4'
/tmp/ccHKfvB7.s:179: Error: operand 1 should be an integer register -- mov r7,x3' /tmp/ccHKfvB7.s:180: Error: operand 1 should be an integer register --mov r2,#0x0'
/tmp/ccHKfvB7.s:440: Error: operand 1 should be an integer register -- mov r0,x2' /tmp/ccHKfvB7.s:441: Error: operand 1 should be an integer register --mov r1,x4'
/tmp/ccHKfvB7.s:442: Error: operand 1 should be an integer register -- mov r7,x3' /tmp/ccHKfvB7.s:443: Error: operand 1 should be an integer register --mov r2,#0x0'
/tmp/ccHKfvB7.s:683: Error: operand 1 should be an integer register -- mov r0,x2' /tmp/ccHKfvB7.s:684: Error: operand 1 should be an integer register --mov r1,x4'
/tmp/ccHKfvB7.s:685: Error: operand 1 should be an integer register -- mov r7,x3' /tmp/ccHKfvB7.s:686: Error: operand 1 should be an integer register --mov r2,#0x0'
/tmp/ccHKfvB7.s:798: Error: operand 1 should be an integer register -- mov r0,x2' /tmp/ccHKfvB7.s:799: Error: operand 1 should be an integer register --mov r1,x4'
/tmp/ccHKfvB7.s:800: Error: operand 1 should be an integer register -- mov r7,x3' /tmp/ccHKfvB7.s:801: Error: operand 1 should be an integer register --mov r2,#0x0'
make: *** [E:/adbi-master/instruments/base/obj/local/arm64-v8a/objs/base/__/hook.o] Error 1

And on compiling example i got

libbase.a : error adding symbols: File in wrong format

no success in any :( please help

@Naveenmahmood
Copy link

i have done with the above errors by compiling it for only armeabi.....

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