This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: question about old patch


>>>>> "Jakub" == Jakub Jelinek <jakub@redhat.com> writes:

Jakub> The class registration is done through library constructor?
Jakub> If so, I'd like to know how you can get duplicate registration.
Jakub> If a library is already loaded, dlopening it (or dlopening some library
Jakub> which has it as dependency) will not run the constructors again.

I'm not an expert on the details here.  My understanding is that there
is a special "JCR" section that lists all the classes, and that this
list is passed to _Jv_RegisterClasses when the library is loaded.

Search for JCR in gcc/crtstuff.c for the implementation.


Hmm, I looked at the stack trace more closely, and dug with strace a
bit, and things look even weirder.  Apparently we're opening two
different copies of lib-org-xml-sax.so (one in $libdir and one that is
installed elsewhere).

This shouldn't be happening.  I'll investigate more, sorry for taking
your time.

Tom


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]