Symbol table resolution
Andrew Haley
aph@redhat.com
Wed Jun 7 18:35:00 GMT 2006
Bryce McKinlay writes:
> Andrew Haley wrote:
> > Properly enforcing access rules in libgcj causes problems in that
> > compiler-generated code sometimes wants to access private methods.
> >
> Presumably, this is only because GCJ doesn't generate accessor methods
> correctly? [*]
No, it's nothing to do with accessor methods.
It's purely for optimization: sometimes the compiler generates calls
to private methods for things like Class.forName(). We need to make
these methods private for security reasons, but the compiler needs to
generate calls to them.
> Also, won't this still break existing binaries? We'd need to bump
> the ABI version and only enable the check for new binaries.
Old binaries don't set the "special" bit, so there are no
compatibility problems. All the old libraries continue to work.
Andrew.
More information about the Java
mailing list