diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2000-10-15 19:54:59 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2000-10-15 19:54:59 +0000 |
commit | dfe1f0384db0cb3a098a476c9f53b0c831ac39de (patch) | |
tree | 25b355bb89974773a78ec0bf051b14db3c327bf3 /gnu/egcs/gcc | |
parent | db8e8b3b59a83bda3f0338c57b6168c22ce8df85 (diff) |
Explain how -shared is supposed to work and what breaks when you
misuse it.
Diffstat (limited to 'gnu/egcs/gcc')
-rw-r--r-- | gnu/egcs/gcc/invoke.texi | 12 |
1 files changed, 9 insertions, 3 deletions
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 |