I can run this code in Linux PC. but after cross compilation and run it in ARM target board, i met Segmentation fault. I used GDB to check the traceback, but couldn't get the actual source line number.
How can i solve the segmentation fault.
Below is my operation:
1. cross compilation:
arm-linux-gcc -g -o test test.c
2. copy test to target
Program received signal SIGSEGV, Segmentation fault.
Cannot access memory at address 0x6e7a6974
5. source code
sprintf(lg,"sed -i 's/22.214.171.124/%s/' /mnt/jffs2/ddns_var/named/gotowiznet.com.dns ",cmd);