public inbox for java@gcc.gnu.org
 help / color / mirror / Atom feed
From: Bryce McKinlay <bmckinlay@gmail.com>
To: Bucher Fabio <fabio.bucher@ntb.ch>
Cc: "java@gcc.gnu.org" <java@gcc.gnu.org>
Subject: Re: ABI
Date: Thu, 11 Apr 2013 21:42:00 -0000	[thread overview]
Message-ID: <CALUNu-p64Fj9+BV1GGJbvAV7CRZR4GRFBO8VYMF03bqwd6ZqDw@mail.gmail.com> (raw)
In-Reply-To: <17B34E365AFABC468216733E4B4CC754615925DC@mail-server.ntb.ch>

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

  parent reply	other threads:[~2013-04-11 21:42 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-04-11 11:56 ABI Bucher Fabio
2013-04-11 11:57 ` ABI Andrew Haley
2013-04-11 21:42 ` Bryce McKinlay [this message]
2013-04-12  9:21   ` ABI Andrew Haley

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CALUNu-p64Fj9+BV1GGJbvAV7CRZR4GRFBO8VYMF03bqwd6ZqDw@mail.gmail.com \
    --to=bmckinlay@gmail.com \
    --cc=fabio.bucher@ntb.ch \
    --cc=java@gcc.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).