同样的helloworld.c ,同样的编译器arm-linux-gcc 4.4.3
编译成bin可以运行,编译成.cgi就出现 Segmentation Fault
arm-linux-gcc -o helloworld helloworld.c
arm-linux-gcc -o helloworld.cgi helloworld.c
将以上两个拷到mini2440上,内核是Linux 2.6.36.2
在控制台下
helloworld可以运行,正常
helloworld.cgi不能运行 ,出现错误Segmentation Fault
有大侠能解答下吗?
多谢!!
复制代码- #include<stdio.h>
- int main()
- {
- printf("Content-type: text/html\n\n");
- printf("<html>\n");
- printf("<head><title>BOA CGI TEST</title></head>\n");
- printf("<body>\n");
- printf("<h1>BOA CGI TEST</h1>\n");
- printf("</body>\n");
- printf("</html>\n");
- return 0;
- }
|