Date: Wed, 4 Feb 2004 21:07:53 -0600 From: Dan Nelson <dnelson@allantgroup.com> To: Joe Lewis <joe@joe-lewis.com> Cc: freebsd-questions@freebsd.org Subject: Re: dlopen() and parent symbols Message-ID: <20040205030753.GC76684@dan.emsphone.com> In-Reply-To: <52640.207.173.181.72.1075949311.squirrel@email.relia.net> References: <52640.207.173.181.72.1075949311.squirrel@email.relia.net>
next in thread | previous in thread | raw e-mail | index | archive | help
In the last episode (Feb 04), Joe Lewis said: > I've read that I can't export symbols from the parent executable to > modules opened with dlopen(). So, I have a (hopefully) quick > question. How can I export function(s) to those modules? ld --export-dynamic? -E --export-dynamic When creating a dynamically linked executable, add all symbols to the dynamic symbol table. The dynamic symbol table is the set of symbols which are visible from dynamic objects at run time. If you do not use this option, the dynamic symbol table will nor- mally contain only those symbols which are referenced by some dynamic object mentioned in the link. If you use "dlopen" to load a dynamic object which needs to refer back to the symbols defined by the program, rather than some other dynamic object, then you will probably need to use this option when linking the program itself. -- Dan Nelson dnelson@allantgroup.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040205030753.GC76684>