]> git.ipfire.org Git - thirdparty/man-pages.git/commitdiff
dlopen.3: Clarify when an executable's symbols can be used for symbol resolution
authorMichael Kerrisk <mtk.manpages@gmail.com>
Wed, 3 Jul 2019 08:06:36 +0000 (10:06 +0200)
committerMichael Kerrisk <mtk.manpages@gmail.com>
Wed, 3 Jul 2019 08:06:36 +0000 (10:06 +0200)
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>
man3/dlopen.3

index 18801ec5daa5fd4a05e671219ec1998ca921a428..fefad1f25a007b7eecb0a56c8131f7e2f2dd4020 100644 (file)
@@ -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 (),