#includeFollow the article Initialize libc for Android to create a dynamic linked android native program, and upload it to emulator. This native program will end with "Illegal instruction".
#include
#include
#include
#include
void _sig_handler(int signo)
{
printf("Got it: %d, %x, \n", signo, &signo);
}
int
main(int argc, char * argv[])
{
struct sigaction sa;
memset(&sa, 0x0, sizeof(sa));
sa.sa_flags = SA_RESTART;
sa.sa_handler = _sig_handler;
if (sigaction(SIGALRM, &sa, NULL) < 0) {
perror("sigaction");
return -1;
}
alarm(1);
sleep(2);
printf("Sleep ... done\n");
return 0;
}
ABI is abbreviated of Application Binary Interface, but I dont know why it will have such problems when check on Old ABI binaries. So dont use it before you know you have to and how to.
Tips:
1. after create a new kernel file, e.g. zImage, use -kernel zImage to use it in android emulator.
1 comment:
Initially, the Apple Store had the largest number of apps, and iPhone users enjoyed a better selection than those that joined Team Android.
best android apps
best iphone apps
Post a Comment