Template-Archiv wrote: [snip] > After having plenty of problems on my Solaris 8 x86 box with gcc and the > linker provided by solaris I now found out [snip] > schulte-03:58:27:~ >echo "int main() { return 0; }" > conftest.c > schulte-03:58:33:~ >gcc -O3 -static conftest.c -o conftest > schulte-03:58:38:~ >./conftest > Segmentation Fault (core dumped) [snip] > > Here are the versions of the tools being used: > > schulte-04:11:06:~ >gcc -v > Reading specs from /usr/local/lib/gcc-lib/i386-pc-solaris2.8/2.95.3/specs > gcc version 2.95.3 20010315 (release) > schulte-04:19:32:~ >ld -V > ld: Software Generation Utilities - Solaris-ELF (4.0) > > Can anybody help ? > > --Christian--
I have almost no experience with gcc, and these questions/suggestions are in no particular order. Exchange the -O3 for -g so that you can examine the core. How do you know that the ld found by your command-line environment is the same ld that is being called by gcc? gcc probably has an option that causes it to be a bit more verbose. Use it to learn the options that it is sending to ld. Also tell gcc to tell ld to be more verbose. On Solaris, don't ever use /usr/ucb/ld (this warning may be out of date). Now that you know which ld man page to trust, have you tried gcc's -Wl,option? Find out which libraries are being linked into the static and dynamic versions. Many compilers/linkers assume that you want a library even if it isn't explictly listed. Maybe you have a version mismatch between static and dynamic libraries. -- Gloria Rom UCLA Library Information Systems [EMAIL PROTECTED]