This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC 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]

[Bug libgcj/21692] [4.1 Regression] unexpected java.lang.NoClassDefFoundError


------- Additional Comments From pinskia at gcc dot gnu dot org  2005-05-24 18:15 -------
Confirmed, here is some analysis from RTH on IRC:
[16:54] < rth> we hashed a plt entry.
[16:54] < rth> grrr.
[17:30] < tromey> ah
[17:30] < tromey> I'm glad you debugged this then
[17:32] < rth> so the problem is that we're not marking some methods as local, which means the 
make_local_function_alias trick fails.
[17:35] < tromey> in make_local_function_alias I see:
[17:35] < tromey>   if (DECL_EXTERNAL (method))
[17:35] < tromey>     return method;
[17:35] < tromey> the problem here is that all CNI native methods will be DECL_EXTERNAL, I think
[17:35] < tromey> is this even fixable?  (I have no idea about this code either)
[17:35] < rth> oh, is forName a cni method?
[17:36] < tromey> there are 2 overloads, one is native
[17:36] < tromey> oh, wait, both are native
[17:36] < tromey> I didn't realize that
[17:37] < rth> it's very tricky.
[17:37] < tromey> ok
[17:37] < rth> we would have to create hidden aliases for all native methods, and Just Know to use that 
alias when building the class table.
[17:38] < rth> so i guess it's not that tricky.  just a bit o coordination between c++ and java front ends.
[17:38] < tromey> oh, I see... modify g++ to also emit the hidden aliases
[17:38] < rth> It does assume that cni methods are linked together with its java class.
[17:38] < rth> yes.
[17:39] < tromey> at the moment there is no other way to really use cni methods
[17:39] < tromey> so that is fine, I think
[17:40] < rth> i'll see what i can come up with.
[17:40] < tromey> thank you


And this is reason why it works just fine on ppc-darwin, because darwin always use the function 
address and not a stub/plt entry for the function pointers.

-- 
           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
     Ever Confirmed|                            |1
   Last reconfirmed|0000-00-00 00:00:00         |2005-05-24 18:15:46
               date|                            |


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=21692


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