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: Patch: RFC: fix non-BC / BC link problem


Andrew Haley wrote:

> Index: libjava/link.cc
> ===================================================================
> RCS file: /cvs/gcc/gcc/libjava/link.cc,v
> retrieving revision 1.16
> diff -u -r1.16 link.cc
> --- libjava/link.cc 15 Jun 2005 19:11:36 -0000 1.16
> +++ libjava/link.cc 16 Aug 2005 19:05:59 -0000
> @@ -1659,11 +1659,11 @@
> if (codesource == NULL)
> codesource = "<no code source>";
> > - // We use a somewhat bogus test for the ABI here.
> char *abi;
> if (_Jv_IsInterpretedClass (klass))
> abi = "bytecode";
> - else if (klass->state == JV_STATE_PRELOADING)
> + // There isn't really a better test for the ABI type at this point.
> + else if (klass->otable_syms || klass->atable_syms || klass->itable_syms)


It is possible for a class to have no syms at all? What will happen?



Its unfortunate that we don't have a proper way to check the ABI type.


klass->next_or_version would work (test for FLAG_BINARYCOMPAT_ABI), but we overwrite the version field during linking to use it for the class chain - probably this is not a good idea as the version field can come in useful later, for things like this, as well as debugging.

Perhaps this current hack could be encapsulated in a _Jv_IsBinaryCompatABI() function in order to make it easier to improve it later?

Bryce


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