GCC 4.0.3 -shared creates segfault

Tijnema ! tijnema at gmail.com
Tue Apr 17 02:24:25 PDT 2007


On 4/17/07, Simon Geard <delgarde at ihug.co.nz> wrote:
> On Mon, 2007-04-16 at 20:30 +0100, Tijnema ! wrote:
> > 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
>
> Yes. The -shared option indicates that gcc should produce a dynamic
> library, rather than a runnable executable. What exactly are you trying
> to do?
>
> Simon.

Trying to create the smallest binaries, just the opposite of -static.
but i guess that using no flags will create a binary that uses the
most possible shared libraries.
Just wondering that there was no error telling me it shouldn't be used
on binaries.

Tijnema



More information about the blfs-support mailing list