Continue with the thread #21. I found another error
9:00:44 DEBUG src/syscall/proc.c:1105: elfuse: HVC #5
09:00:44 DEBUG src/syscall/syscall.c:1790: syscall 226@0x25ed88(0x270000, 0x4000, 0x1, 0x1, 0x200004088, 0x200004084)
09:00:44 DEBUG src/syscall/syscall.c:1822: -> 0 (0x0)
09:00:44 DEBUG src/syscall/proc.c:1048: elfuse: [20] vcpu_run PC=0xfeffd012a8
09:00:44 DEBUG src/syscall/proc.c:1105: elfuse: HVC #11
09:00:44 DEBUG src/syscall/proc.c:1584: elfuse: EL0 data fault at 0x182 PC=0x21e8f4 (ESR=0x92000047 FSC=0x7) -> SIGSEGV/MAPERR
09:00:44 DEBUG src/syscall/proc.c:1609: elfuse: signal 11 deliver returned -1
This is what I'm checking in the binary
$ANDROID_NDK_HOME/toolchains/llvm/prebuilt/darwin-x86_64/bin/llvm-addr2line \
-e build/bin/test_return_42 -f \
0x21e8c0 0x21e8d0 0x21e8e0 0x21e8f0
_Z21__libc_init_AT_SECUREPPc
bionic/libc/bionic/libc_init_common.cpp:412
_Z21__libc_init_AT_SECUREPPc
bionic/libc/bionic/libc_init_common.cpp:415
_Z21__libc_init_AT_SECUREPPc
bionic/libc/bionic/libc_init_common.cpp:386
_ZL13__early_abortm
bionic/libc/bionic/libc_init_common.cpp:219
Look like it mising AT_SECURE. I tried this and it works.
In src/core/stack.h, add:
#define AT_SECURE 23
In src/core/stack.c, add one line after the UID/GID entries:
AUX(AT_EGID, GUEST_GID);
AUX(AT_SECURE, 0); /* This is the one that I added for temporary test */
AUX(AT_HWCAP2, query_hwcap2());
Please help to review
Continue with the thread #21. I found another error
This is what I'm checking in the binary
Look like it mising
AT_SECURE. I tried this and it works.In
src/core/stack.h, add:#define AT_SECURE 23In
src/core/stack.c, add one line after the UID/GID entries:Please help to review