|Subject:||Need help on: Illegal Instruction|
|Date:||Mon, 12 Nov 2001 12:49:34 +0100|
I have to compile a C-program which is created, compiled and linked on an HP-UX workstation on a SUN-workstation with GNU gcc compiler (tried on 2.95.3 and 3.0.2 on Solaris 2.7).
There is a compile-script which creates a sourcecode-file head.c and compiles and links it with my test.c file.
The original file (from HP) makes following commands:
#> compile test
#> /opt/ansic/bin/cc -Ae +z -c test.c
#> cc -c -Aa +z +DA1.1d +DS2.0a head.c
#> ld -o ./test -e head +s -a shared -b +e head +e errno head.o test.o /path/to/additional/lib.a -lc -lf -lm > rescomp 2>&1
I have changed the option to:
#> compisun test
#> gcc -c -ansi test.c
#> gcc -c -ansi head.c
#> ld -o ./test -e head -dy -B dynamic -G -b head.o test.o /path/to/additional/lib.a -lc -lg2c -lm > rescomp 2>&1
At compile- and linktime there is no error message. But at runtime the only message I get is: "Illegal Instruction"
That also happens when I compile a "Hello World" programm.
Is there anything wrong with the gcc and ld options or is the bug in the source code?
Could anyone help me to find that bug?
Thanks for Your answers
|[Prev in Thread]||Current Thread||[Next in Thread]|