Created
December 12, 2021 01:50
-
-
Save leveled/23c4a6fdc9c98178aa3443ead454663c to your computer and use it in GitHub Desktop.
Install cross-compile libs and run ARM64 binaries
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sudo apt update -y && sudo apt upgrade -y | |
sudo apt install qemu-user qemu-user-static gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu binutils-aarch64-linux-gnu-dbg build-essential | |
#compile statically | |
aarch64-linux-gnu-gcc -static -o hello64 hello.c | |
#compile dynamically | |
aarch64-linux-gnu-gcc -o hello64dyn hello64.c | |
qemu-aarch64 -L /usr/aarch64-linux-gnu ./hello64dyn |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment