diff options
author | 2000-10-15 19:54:58 +0000 | |
---|---|---|
committer | 2000-10-15 19:54:58 +0000 | |
commit | 10b1e978e8104ee3f8a574e07d87cacb063cdc61 (patch) | |
tree | e9d971d3e5d3348446c2c068866d27b73fb8f7c8 | |
parent | add note that pkg_add is not to be used for system distribution files. (diff) | |
download | wireguard-openbsd-10b1e978e8104ee3f8a574e07d87cacb063cdc61.tar.xz wireguard-openbsd-10b1e978e8104ee3f8a574e07d87cacb063cdc61.zip |
Explain how -shared is supposed to work and what breaks when you
misuse it.
-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 |