The title says it all (surprisingly).
This is my test.
Test source code - a.c
#include <stdio.h>
int main() {
int a = 0;
printf("%d\n", 1 / a);
printf("Done\n");
return 0;
}
Build it for x64 (ubuntu 22.04).
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.3 LTS
Release: 22.04
Codename: jammy
$ gcc --version
gcc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
$ gcc a.c
$ ./a.out
Floating point exception (core dumped)
However, built it for aarch64 with android-ndk toolchain.
$ android/ndk/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android33-clang a.c
$ adb push a.out /data/a.out
$ adb shell /data/a.out
0
Done
No error! Just gives ZERO!!
'Domain > Android' 카테고리의 다른 글
[Ninja] Feature of build-tool : Implicit dependency to input '.ninja' file (0) | 2016.03.04 |
---|---|
[Android] Build goldfish kernel with NDK toolchain. (0) | 2015.10.19 |
[Android] signing verification (0) | 2015.02.11 |
[Android] 죽지않는 service 만들기. (0) | 2015.02.11 |
[Android] Package verification with signature. (0) | 2015.02.02 |