This is the mail archive of the
java-patches@gcc.gnu.org
mailing list for the Java project.
Re: Patch: RFC: fix non-BC / BC link problem
- From: Bryce McKinlay <mckinlay at redhat dot com>
- To: Andrew Haley <aph at redhat dot com>
- Cc: Tom Tromey <tromey at redhat dot com>, Java Patch List <java-patches at gcc dot gnu dot org>
- Date: Wed, 17 Aug 2005 12:03:52 -0400
- Subject: Re: Patch: RFC: fix non-BC / BC link problem
- References: <m3wtmllmzr.fsf@localhost.localdomain> <17154.65056.347189.981031@zapata.pink>
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