/* hello.c: a small sample program for ALink Apps (arm64 Linux, statically linked). Build: aarch64-linux-gnu-gcc -O2 -static -o alink-apps-hello hello.c */ #include #include #include #include int main(int argc, char **argv) { struct utsname u; time_t now = time(0); char when[64]; uname(&u); strftime(when, sizeof when, "%Y-%m-%d %H:%M:%S", localtime(&now)); printf("Hello from an arm64 Linux program.\n"); printf("system: %s %s\n", u.sysname, u.machine); printf("process: %d\n", (int)getpid()); printf("time: %s\n", when); for (int i = 1; i < argc; i++) printf("arg %d: %s\n", i, argv[i]); return 0; }