aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Kerrisk <mtk.manpages@gmail.com>2019-07-03 10:06:36 +0200
committerMichael Kerrisk <mtk.manpages@gmail.com>2019-07-03 10:06:36 +0200
commit58a4ac49d4dbbc295da77807bfaf261642610634 (patch)
tree1705be3c67612f366f62a67011de2d255588c947
parent43898de48866c677269c8c1821e2ceb35bc865f6 (diff)
downloadman-pages-58a4ac49d4dbbc295da77807bfaf261642610634.tar.gz
dlopen.3: Clarify when an executable's symbols can be used for symbol resolution
The --export-dynamic linker option is not the only way that main's global symbols may end up in the dynamic symbol table and thus be used to satisfy symbol reference in a shared object. A symbol may also be placed into the dynamic symbol table if ld(1) notices a dependency in another object during the static link. Verified by experiment; see previous commit. Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r--man3/dlopen.315
1 files changed, 11 insertions, 4 deletions
diff --git a/man3/dlopen.3 b/man3/dlopen.3
index 18801ec5da..fefad1f25a 100644
--- a/man3/dlopen.3
+++ b/man3/dlopen.3
@@ -214,10 +214,17 @@ flag;
and definitions in the shared object itself
(and any dependencies that were loaded for that object).
.PP
-If the executable was linked with the flag "\-rdynamic"
-(or, synonymously, "\-\-export\-dynamic"),
-then global symbols in the executable will also be used
-to resolve references in a dynamically loaded shared object.
+Any global symbols in the executable that were placed into
+its dynamic symbol table by
+.BR ld (1)
+can also be used to resolve references in a dynamically loaded shared object.
+Symbols may be placed in the dynamic symbol table
+either because the executable was linked with the flag "\-rdynamic"
+(or, synonymously, "\-\-export\-dynamic"), which causes all of
+the executable's global symbols to be placed in the dynamic symbol table,
+or because
+.BR ld (1)
+noted a dependency on a symbol in another object during static linking.
.PP
If the same shared object is opened again with
.BR dlopen (),