From f28529d7985df9d19f8a03600c96c8add57a296c Mon Sep 17 00:00:00 2001 From: Joseph Koshy Date: Wed, 17 Feb 1999 02:41:04 +0000 Subject: [PATCH] Add a note about ELF executables requiring to be linked with -export-dynamic for dlsym() searches inside the executable to work. --- lib/libc/gen/dlopen.3 | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lib/libc/gen/dlopen.3 b/lib/libc/gen/dlopen.3 index 7cdfbd711043..9e848f9e8428 100644 --- a/lib/libc/gen/dlopen.3 +++ b/lib/libc/gen/dlopen.3 @@ -219,6 +219,14 @@ The object-intrinsic functions and .Fn _fini are called with no arguments, and are not expected to return values. +.Sh NOTES +ELF executables need to be linked +using the +.Fl export-dynamic +option to +.Xr ld 1 +for symbols defined in the executable to become visible to +.Fn dlsym . .Sh ERRORS .Fn dlopen and