public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
* ABI
@ 2013-04-11 11:56 Bucher Fabio
  2013-04-11 11:57 ` ABI Andrew Haley
  2013-04-11 21:42 ` ABI Bryce McKinlay
  0 siblings, 2 replies; 4+ messages in thread
From: Bucher Fabio @ 2013-04-11 11:56 UTC (permalink / raw)
  To: java

Hi


I am looking for the ABI the GCJ uses. Wich file contains the information a= =3D bout it?

Is it in the sourcecode or exist a pdf-documantation?


Thanks for your help and best regards

Fabio Bucher

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ABI
  2013-04-11 11:56 ABI Bucher Fabio
@ 2013-04-11 11:57 ` Andrew Haley
  2013-04-11 21:42 ` ABI Bryce McKinlay
  1 sibling, 0 replies; 4+ messages in thread
From: Andrew Haley @ 2013-04-11 11:57 UTC (permalink / raw)
  To: Bucher Fabio; +Cc: java

On 04/11/2013 12:56 PM, Bucher Fabio wrote:

> I am looking for the ABI the GCJ uses. Wich file contains the information a= =3D bout it?
> 
> Is it in the sourcecode or exist a pdf-documantation?

It's in the source code.  Except for interfaces, GCJ uses as closely
as is possible the C++ ABI.

Andrew.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ABI
  2013-04-11 11:56 ABI Bucher Fabio
  2013-04-11 11:57 ` ABI Andrew Haley
@ 2013-04-11 21:42 ` Bryce McKinlay
  2013-04-12  9:21   ` ABI Andrew Haley
  1 sibling, 1 reply; 4+ messages in thread
From: Bryce McKinlay @ 2013-04-11 21:42 UTC (permalink / raw)
  To: Bucher Fabio; +Cc: java

On Thu, Apr 11, 2013 at 12:56 PM, Bucher Fabio <fabio.bucher@ntb.ch> wrote:

> I am looking for the ABI the GCJ uses. Wich file contains the information a= =3D bout it?
>
> Is it in the sourcecode or exist a pdf-documantation?

GCJ actually has two ABIs. The first, "old ABI" mimics the C++ ABI in
most respects: C++ code can call Java classes as if they were C++,
more-or-less. This results in a "brittle" ABI: any non-trivial change
to an underlying library requires re-compilation of binaries built
against it.

The second, "BC ABI" (enabled with --indirect-dispatch) changes the
way things like method calls, field accesses, and class loading work
so that compiled code more closely adheres to the binary compatibility
rules of Java bytecode.

Unfortunately there isn't a full BC ABI specification document, but
you can read a bit about the implementation here:
ftp://gcc.gnu.org/pub/gcc/summit/2004/GCJ%20New%20ABI.pdf

If you're looking at the libgcj source code, java/lang/Class.h,
java/lang/natClass.cc, and link.cc would be good places to start. In
the front end (gcc/java), look for code that's conditional on
flag_indirect_dispatch.

Bryce

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: ABI
  2013-04-11 21:42 ` ABI Bryce McKinlay
@ 2013-04-12  9:21   ` Andrew Haley
  0 siblings, 0 replies; 4+ messages in thread
From: Andrew Haley @ 2013-04-12  9:21 UTC (permalink / raw)
  To: Bryce McKinlay; +Cc: Bucher Fabio, java

On 04/11/2013 10:42 PM, Bryce McKinlay wrote:
> On Thu, Apr 11, 2013 at 12:56 PM, Bucher Fabio <fabio.bucher@ntb.ch> wrote:
> 
>> I am looking for the ABI the GCJ uses. Wich file contains the information a= =3D bout it?
>>
>> Is it in the sourcecode or exist a pdf-documantation?
> 
> GCJ actually has two ABIs. The first, "old ABI" mimics the C++ ABI in
> most respects: C++ code can call Java classes as if they were C++,
> more-or-less. This results in a "brittle" ABI: any non-trivial change
> to an underlying library requires re-compilation of binaries built
> against it.
> 
> The second, "BC ABI" (enabled with --indirect-dispatch) changes the
> way things like method calls, field accesses, and class loading work
> so that compiled code more closely adheres to the binary compatibility
> rules of Java bytecode.

Ah, good point.  I presumed that the question was about the C++ ABI,
since that's the only thing that's really externally visible.

Andrew.


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2013-04-12  9:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-04-11 11:56 ABI Bucher Fabio
2013-04-11 11:57 ` ABI Andrew Haley
2013-04-11 21:42 ` ABI Bryce McKinlay
2013-04-12  9:21   ` ABI Andrew Haley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).