summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2013-11-02 09:41:59 +0000
committerMarc Espie <espie@cvs.openbsd.org>2013-11-02 09:41:59 +0000
commit033c8a289ea6e79e8060870a3ae5291dfbb6ec92 (patch)
tree048bd7d8b11a247106dbcbfe7930a08aca880e93 /share
parent0f87c4efeeca5542c01565753d2c05a1e3e1e6cb (diff)
move the global description of --export-symbols up to dlopen,
since that's where the problem usually gets noticed, add -rdynamic for gcc. okay matthew@
Diffstat (limited to 'share')
-rw-r--r--share/man/man3/dlfcn.321
1 files changed, 14 insertions, 7 deletions
diff --git a/share/man/man3/dlfcn.3 b/share/man/man3/dlfcn.3
index cc9071cd2fc..b8f41ba30bb 100644
--- a/share/man/man3/dlfcn.3
+++ b/share/man/man3/dlfcn.3
@@ -1,4 +1,4 @@
-.\" $OpenBSD: dlfcn.3,v 1.26 2013/07/10 06:43:38 jmc Exp $
+.\" $OpenBSD: dlfcn.3,v 1.27 2013/11/02 09:41:58 espie Exp $
.\" $NetBSD: dlfcn.3,v 1.3 1996/01/09 19:43:34 pk Exp $
.\"
.\" Copyright (c) 1995 Paul Kranenburg
@@ -29,7 +29,7 @@
.\" (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
.\" THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
.\"
-.Dd $Mdocdate: July 10 2013 $
+.Dd $Mdocdate: November 2 2013 $
.Dt DLFCN 3
.Os
.Sh NAME
@@ -124,6 +124,18 @@ each of the above values together.
If an object was opened with RTLD_LOCAL and later opened with RTLD_GLOBAL,
then it is promoted to RTLD_GLOBAL.
.Pp
+The main executable's symbols are normally invisible to
+.Fn dlopen
+symbol resolution.
+Those symbols will be visible if linking is done with
+.Xr gcc 1
+.Fl rdynamic ,
+which is equivalent to
+.Xr ld 1
+.Fl -export-dynamic .
+.Pp
+All shared objects loaded at program startup are globally visible.
+.Pp
.Fn dlopen
returns a
.Fa handle
@@ -171,11 +183,6 @@ respects symbol visibility as specified by the
.Fa mode
parameter.
However, the symbols of an object's dependencies are always visible to it.
-All shared objects loaded at program startup are globally visible.
-Only the symbols in the main executable that are referenced by a
-shared object at link time will be visible unless it has been linked
-with the --export-dynamic option where all of its symbols will be
-visible.
The following special
.Fa handles
may be used with