[vmkit-commits] [PATCH] Fix symbol search order to fix detection of symbols from vmkit or loaded libs

Will Dietz wdietz2 at illinois.edu
Tue Nov 15 12:41:14 PST 2011


On Tue, Nov 15, 2011 at 2:24 PM, Nicolas Geoffray
<nicolas.geoffray at gmail.com> wrote:
> Hi Will,
>
> I'm not sure that's right. With GNU Classpath, I also want to define my own
> methods and not use the ones implemented in Classpath. If we reorder things,
> the method defined in GNU Classpath will be used. Not mine.
> vmkit is using RTLD_LOCAL when loading, so symbol resolution on a dlsym must
> provide the loaded library. If you do dlsym(SELF_HANDLE, 'mysymbol'), you'll
> only get symbols loaded in the j3 executable.
> What is it that does not work for you?
> Cheers,
> Nicolas
>

Hmm.

Well, to answer your question I'm seeing the 'j3' flag set for things
like Java_awt_Font_initIDs, resulting in calling the functions wrong.

As for whether or not it's correct: I'm not sure that
dlsym(RTLD_DEFAULT,...) is the same as dlsym(dlopen(NULL),...), which
might be the difference.  The latter clearly does what you suggest,
the former I'm not sure (from the man pages).

I'll double-check what's going on locally, and get back to you.

Thanks! :)

~Will



More information about the vmkit-commits mailing list