Re: dlopen() sees some symbols, but not others
- From: "Rob Y" <ryampolsky@xxxxxxxxx>
- Date: 28 Dec 2006 08:14:51 -0800
Paul Pluzhnikov wrote:
Finally, I added a call to FormatElement() to my stub module to
explicitly 'link it in', and now it's resolvable by dlopen().
That's consistent with FormatElement() having been GC'd,
until you added explicit reference for it ...
Interesting. Now that I dig further, I find a call to LogFormattedKey
from inside the main app, so I guess that function was there all along.
Odd, though, that since LogFormattedKey calls FormatElement, and the
code must be there, that symbol isn't exported. I guess the GC
algorithm's tricky.
Do you know of a way to bypass this symbol garbage collection? If
not, I can just change my dummy 'dllstub.c' module to make calls to all
the functions I want to force to be available, and I guess that'll
force them to be pulled in and exported via -bexpall.
By the way, is garbage collection only done for modules pulled in by
the linker from a library? If the .o's are explicitly fed to the
linker, are all functions in the .o's kept even if they're not
referenced by the app? The functions in my dllstub.c module are never
called - they're just there to provide references to other functions I
want included, so I'm guessing that the answer is yes.
Thanks,
Rob
.
- Follow-Ups:
- Re: dlopen() sees some symbols, but not others
- From: Gary R. Hook
- Re: dlopen() sees some symbols, but not others
- References:
- dlopen() sees some symbols, but not others
- From: Rob Y
- Re: dlopen() sees some symbols, but not others
- From: Paul Pluzhnikov
- dlopen() sees some symbols, but not others
- Prev by Date: Re: Is it possible to install xlc under user home directory (wihout root permissions)
- Next by Date: Re: dlopen() sees some symbols, but not others
- Previous by thread: Re: dlopen() sees some symbols, but not others
- Next by thread: Re: dlopen() sees some symbols, but not others
- Index(es):
Relevant Pages
|