From dfe1f0384db0cb3a098a476c9f53b0c831ac39de Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Sun, 15 Oct 2000 19:54:59 +0000 Subject: Explain how -shared is supposed to work and what breaks when you misuse it. --- gnu/egcs/gcc/invoke.texi | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'gnu/egcs/gcc') diff --git a/gnu/egcs/gcc/invoke.texi b/gnu/egcs/gcc/invoke.texi index b7faa6b78c8..f86f3bddbd3 100644 --- a/gnu/egcs/gcc/invoke.texi +++ b/gnu/egcs/gcc/invoke.texi @@ -2909,9 +2909,15 @@ libraries. On other systems, this option has no effect. @item -shared Produce a shared object which can then be linked with other objects to -form an executable. Not all systems support this option. You must -also specify @samp{-fpic} or @samp{-fPIC} on some systems when -you specify this option. +form an executable. Not all systems support this option. For predictable +results, you must also specify the same set of options that were used to +generate code (@samp{-fpic}, @samp{-fPIC}, or model suboptions) +when you specify this option.@footnote{On some systems, @code{gcc -shared} +needs to build supplementary stub code for constructors to work. On +multi-libbed systems, @code{gcc -shared} must select the correct support +libraries to link against. Failing to supply the correct flags may lead +to subtle defects. Supplying them in cases where they are not necessary +is innocuous.} @item -symbolic Bind references to global symbols when building a shared object. Warn -- cgit v1.2.3