Static compilation: segmentation fault in execution [host=x86_64, target: ia64]
Hello:
I have installed in my x86_64 machine running Debian Sid the cross
compiler for ia64 from emdebian squeeze. I need to run my programs in
an old Altix 3700 Bx2 machine with 64 CPUs, and I need the cross
compiler because the machine has very old compilers (no OpenMP, etc.)
Because the machine has old libraries and kernel (Linux 2.4) I need to
generate the executables statically linked. The problem is when I run
them.
I have problems with a simple Hello world program
#include<stdio.h>
int main()
{
printf("Hello world\n");
return 0;
}
If I compile it dynamically linked, the executable runs without
problems in the ia64 environment, but if I compile it statically
linked (ia64-linux-gnu-gcc -static hello.c -o hello), when I try to
run in the ia64 machine I obtain a segmentation fault:
ia64-linux-gnu-gcc -static hello.c -o hello_static
./hello_static
Segmentation fault
Is it a bug?
Thanks
--
*****************************************
José Luis García Pallero
jgpallero@gmail.com
(o<
/ / \
V_/_
Use Debian GNU/Linux and enjoy!
*****************************************
Reply to: