GCC 4.0.3 -shared creates segfault

Tijnema ! tijnema at gmail.com
Mon Apr 16 12:30:11 PDT 2007


Hi,

Is it normal when using -shared to create binaries that they are a segfault.

This is what i did for example
/# echo "main(){}" > dummy.c
/# gcc -shared dummy.c -o dummy
/# ./dummy
Segmentation fault

I'm using GCC-4.0.3 (LFS-6.2 pre-release).

removing the -shared solves the problem. Also using -static there's no segfault.

Is this normal behaviour because -shared should be used on libraries only?

Tijnema



More information about the blfs-support mailing list