From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28610 invoked by alias); 11 Apr 2013 21:42:48 -0000 Mailing-List: contact java-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: java-owner@gcc.gnu.org Received: (qmail 28601 invoked by uid 89); 11 Apr 2013 21:42:48 -0000 X-Spam-SWARE-Status: No, score=-5.3 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE,TW_GC autolearn=ham version=3.3.1 Received: from mail-wg0-f42.google.com (HELO mail-wg0-f42.google.com) (74.125.82.42) by sourceware.org (qpsmtpd/0.84/v0.84-167-ge50287c) with ESMTP; Thu, 11 Apr 2013 21:42:47 +0000 Received: by mail-wg0-f42.google.com with SMTP id k13so1010152wgh.1 for ; Thu, 11 Apr 2013 14:42:45 -0700 (PDT) MIME-Version: 1.0 X-Received: by 10.194.5.4 with SMTP id o4mr13486555wjo.40.1365716565594; Thu, 11 Apr 2013 14:42:45 -0700 (PDT) Received: by 10.194.5.9 with HTTP; Thu, 11 Apr 2013 14:42:45 -0700 (PDT) In-Reply-To: <17B34E365AFABC468216733E4B4CC754615925DC@mail-server.ntb.ch> References: <17B34E365AFABC468216733E4B4CC754615925DC@mail-server.ntb.ch> Date: Thu, 11 Apr 2013 21:42:00 -0000 Message-ID: Subject: Re: ABI From: Bryce McKinlay To: Bucher Fabio Cc: "java@gcc.gnu.org" Content-Type: text/plain; charset=ISO-8859-1 X-SW-Source: 2013-04/txt/msg00007.txt.bz2 On Thu, Apr 11, 2013 at 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? 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