This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: Symbols relocatable using dlopen?
Alan Modra <amodra@bigpond.net.au> writes:
> On Fri, Aug 28, 2009 at 12:58:06PM +0300, Marcus Clyne wrote:
>> I have a function my_print () defined in my program, but in calling
>> dlopen() I get the following error:
>>
>> undefined symbol: my_print
>
> my_print is likely not a dynamic symbol. You can check with nm -D.
> There are a number of ways to make sure it is dynamic, eg. link
> your program against your dlopen'd shared lib with --no-add-needed,
> or use --dynamic-list.
Or link your main program with --export-dynamic.
Ian