brevent / genuine

292 stars 57 forks source link

Compile Error #4

Closed blueb0ne closed 4 years ago

blueb0ne commented 5 years ago

I try compile but it fails.Looks like openAt Function in openat.c fails while compile ARM64 abi.I don't know how to fix it.Every suggestion will be appreciated,thanks!

compile Environment : Android Studio 3.0 beta( with gradle version 3.2.1, ndk version r16b)

Error:FAILURE: Build failed with an exception. C:\Users\blueberry\AppData\Local\Temp\cc9SCjyW.s: Assembler messages: C:\Users\blueberry\AppData\Local\Temp\cc9SCjyW.s:7771: Error: invalid immediate: 322 is out of range ninja: build stopped: subcommand failed.

liudongmiao commented 4 years ago

You can modify the line

"mov r7, #" STR(__NR_openat) "\n\t"

to

"movw r7, #" STR(__NR_openat) "\n\t"

Or, use the ldr syntax as original __openat.S

"ldr r7, =" STR(__NR_openat) "\n\t"
blueb0ne commented 4 years ago

it works,thanks!