Last active
December 30, 2016 06:04
-
-
Save alexandernst/5228155 to your computer and use it in GitHub Desktop.
Cross-compiling applications for ARM
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
$ pwd | |
/home/alexandernst/tmp_arm_build | |
$ cat hello_world.c | |
#include <stdio.h> | |
int main(int argc, char **argv){ | |
printf("Hello world!\n"); | |
return 0; | |
} | |
$ gcc -o hello_world hello_world.c | |
$ file hello_world | |
hello_world: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.32, BuildID[sha1]=890ead80cd49432f62fdea2309329a4f42c22c61, not stripped | |
$ ./hello_world | |
Hello world! | |
$ sb2 gcc -o hello_world hello_world.c | |
$ file hello_world | |
hello_world: ELF 32-bit LSB executable, ARM, EABI5 version 1 (SYSV), dynamically linked (uses shared libs), for GNU/Linux 2.6.16, not stripped | |
$ qemu-arm -L /home/alexandernst/tmp_buildroot/buildroot-2013.02_clean/buildroot-2013.02/output/host/opt/ext-toolchain/arm-none-linux-gnueabi/libc/ ./hello_world | |
Hello world! | |
$ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment