sudo apt install qemu-user
prometheus@courage-machine:~/module-test/clock$ arch
x86_64
prometheus@courage-machine:~/module-test/clock$ file a.out
a.out: ELF 64-bit LSB executable, ARM aarch64, version 1 (GNU/Linux), statically linked, BuildID[sha1]=d1539d52063d3009dd1cb2c1ae240a2a6c4d648e, for GNU/Linux 3.7.0, not stripped
prometheus@courage-machine:~/module-test/clock$ ./a.out
0 167 1000000
prometheus@courage-machine:~/module-test/clock$
arm-linux-gnueabihf-gcc a.c -static
qemu-arm -cpu cortex-a9 ./a.out
aarch64-linux-gnu-gcc a.c -static
qemu-aarch64 ./a.out
The qemu-user emulator
can run binaries for other architectures
but with the same operating system as the current one